div css布局为什么底部没有颜色呢?bgcolor也设置了 为什么不能生效呢?_html/css_WEB-ITnose
程序员文章站
2022-05-25 09:59:54
...
css代码
HTML
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
上一篇: 支付宝回调验证签名失败怎么解决?