利用float实现三栏布局
<head>
<style>
/* html同上 */
#container {
width: 900px;
height: 600px ;
border: 2px dashed ;
margin: 0 auto; /*在body居中显示*/
}
#container div {
margin:5px;
border: 2px dotted ;
}
</style>
</head>
<body>
<div id="container">
<div style="width:100px;height:580px;float:left">1</div>
<div style="width:650px;height:580px;float:left">2</div>
<div style="width:100px;height:580px;float:left">3</div>
</div>
<div style="border:1px solid purple;text-align:center">容器外</div>
</body>

浙公网安备 33010602011771号