<!DOCTYPE?html>
<html>
<head>
<meta?charset="UTF-8">
<title></title>
<style>
*{margin:0;padding:?0;}
body{min-width:?700px;}
.top,.bottom{
width:?100%;
height:?50px;
line-height:?40px;
background-color:?#539D26;
margin:?0?auto;
float:?left;
}
.zhong{
padding:?0?200px?0?200px;
}
.z,.left,.right{
position:?relative;
float:?left;
min-height:?300px;
}
.z{
background-color:?#999999;
width:?100%;
}
.left{
width:?200px;
background-color:?#00FFFF;
margin-left:?-100%;
left:?-200px;
}
.right{
width:?200px;
background-color:?#00FF00;
margin-right:?-200px;
}
</style>
</head>
<body>
<div?class="top">頭部</div>
<div?class="zhong">
<div?class="z">zhonga<br?/><br?/><br?/><br?/><br?/><br?/><br?/>
<br?/><br?/><br?/><br?/><br?/><br?/><br?/><br?/><br?/><br?/><br?/><br?/>
<br?/><br?/><br?/><br?/><br?/><br?/><br?/><br?/><br?/><br?/><br?/><br?/>
v<br?/><br?/><br?/><br?/><br?/><br?/><br?/><br?/><br?/><br?/><br?/>
<br?/><br?/><br?/><br?/><br?/><br?/><br?/><br?/>asdasdasd
</div>
<div?class="left">zuo</div>
<div?class="right">you</div>
</div>
<div?class="bottom">尾部</div>
</body>
</html>上面是代碼,打開后可以看到只有中間部分延長了,兩側(cè)不會跟著延長,我試過給左中右三個div設(shè)置height:100%,但是沒用,如果要實現(xiàn)左中右三列延長的時候還能同步,要怎么設(shè)置?謝謝!
添加回答
舉報
0/150
提交
取消