div css布局为什么底部没有颜色呢?bgcolor也设置了 为什么不能生效呢?_html/css_WEB-ITnose

时间:2016-06-24 11:54:35 来源:互联网 作者: 神秘的大神 字体:

css代码
body{	 	 width:960px;	 margin:0 auto;	 	 }.top{	width:960px;	height:162px;	background-color:yellow;}.top ul{	padding:0px;	margin:0px;}.top ul li/*外面包围样式*/{	list-style-type:none;		float:left;	width:150px;	height:150px;	margin:10px 0px 0px 33px;	padding-left:0px;	}.top img{	width:150px;	height:150px;	}.middleleft{	width:200px;		background-color:yellow;	float:left;}.middleleft ul{	padding:0px;	margin:0px;}.middleleft ul li{	list-style-type:none;			margin:15px 0px 0px 33px;	}.middleleft img{	width:150px;	height:150px;}.middleright{	width:209px;		float:left;	background-color:yellow;}.middleright ul{		padding:0px;	margin:0px;}.middleright li{			list-style-type:none;	margin:15px 0px 0px 14px;	}.middleright img{		width:150px;	height:150px;}.middlemid{	width:551px;	height:336px;	background-color:green;	float:left;}.end1{		width:960px;	background-color:yellow;	}.end1 ul{	padding:0px;	margin:0px;}.end1 ul li/*外面包围样式*/{	list-style-type:none;		float:left;	width:150px;	height:150px;	margin:10px 0px 0px 33px;	padding-left:0px;	}.end1 img{	width:150px;	height:150px;	}

HTML
 
 
 
middlemid


回复讨论(解决方案)

效果图

清除float

 
 
 
middlemid