<html><head><title>布局</title><style type="text/css">body{margin:0;padding:0}.top{height:100px;background:blue}.head{height:100px;wideth:800px;background:#ddd;margin:0 auto}.main{width:800px;height:600px;background:#900;margin:0 auto}.left{width:200px;height:600px;background:#ccc;float:left}.right{width:600px;height:600px;;background:#ddd;float:left}.sub_l{width:400px;height:600px;background:green;float:left}.sub_r{width:200px;height:600px;background:#ccc;float:right}.foot{width:800px;height:100px;background:blue;margin:0 auto}</style></head><body><div class="top"><div class="head"></div></div><div class="main"><div class="left"></div><div class="right"><div class="sub_l"></div><div class="sub_r"></div></div><div class="foot"></div></body></html>
1 回答
已采纳
qq_大寒_2
TA贡献173条经验 获得超185个赞
.head{height:100px;wideth:800px;background:#ddd;margin:0 auto}
有个小错误。,width写成wideth了。
<body> <div class="top"> <div class="head"></div> </div> <div class="main"> <div class="left"></div> <div class="right"> <div class="sub_l"></div> <div class="sub_r"></div> </div> </div><!--这里少了个</div>标签--> <div class="foot"></div> </body>
- 1 回答
- 0 关注
- 1313 浏览
相关问题推荐
添加回答
举报
0/150
提交
取消