右侧宽度自适应怎么写
用浮动怎么让宽度自适应?
2016-07-25
<style type="text/css">
body{ margin:0; padding:0; font-size:30px; color:#fff}
.top{height:100px; background:#ccc;}
.left{ width:200px;float:left; height:300px; background-color: #9CF}
.right{margin-right:210px;background:#F90; width:100%;}
.foot{height:50px; background:#F90;clear:both;}
</style></head>
<body>
<div class="top">top</div>
<div class="main">
<div class="left">left</div>
<div class="right">right</div>
</div>
<div class="foot">foot</div>
</body>
</html>
举报