我想对左 div 为 100% 且右保持固定的 div 产生影响
<!DOCTYPE html>
<html>
<style>
.left {
width: 100%;
float: left;
border: #ccc solid 1px;
}
.right {
width: 50px;
float:left;
border: #987 solid 1px;
}
.main {
border: #666 solid 1px;
margin: 0px auto;
}
.clear {
clear:both;
}
</style>
<body>
<div class="main">
<div class="left">
</div>
<div class="right">
</div>
<div class="clear"></div>
</div>
</body>
</html>
我知道我可以使用 table 来轻松实现这一点,但是如何使用 div 实现这一点