right宽度自适应为什么宽度很小
这是我写出来的代码:(为什么右边的right不设置宽度的话,自适应宽度很小?)
<html>
<head>
<style type="text/css">
body {margin:0; padding:0; font-size:30px;}
.top {height:100px; background:pink;}
.main {width:800px; height:600px; background:red;}
.left {width:200px; height:600px; background:blue; float:left;}
.right {height:600px; background:orange; float:right;}
.foot {width:800px; height:50px; background:green;}
</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>