1. 程式人生 > >雙飛翼

雙飛翼

雙飛翼:因外形對稱與鳥類的翅膀一樣;

  即兩側寬度固定中間寬度自適應;具體程式碼如下

<head>

<style>
.box{
width: 80%;
margin: auto;
}
.box1{
width: 100%;
background: hotpink;
float: left;
}
.box1-1{
height: 500px;
background: saddlebrown;
margin: 0px 200px;
}
.box2{
width: 150px;
height: 500px;
float: left;
margin-left: -100%;
background: red;

}
.box3{
width: 150px;
height: 500px;
float: right;
margin-left: -100%;
background: red;
}
</style>

</head>

 

<body>

<div class="box">
<div class="box1">
<div class="box1-1">
drhygwsery
</div>
</div>
<div class="box2">
</div>
<div class="box3">
</div>
</div>

</body>