Blogger Information
Blog 15
fans 0
comment 0
visits 10425
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
双飞翼布局实战演示-2019年1月16日
超超的博客
Original
641 people have browsed it
<!DOCTYPE html>
<html>
<head>
<title>双飞翼布局</title>
<meta charset="utf-8">
<style>
.head {
width: 100%;
height: 50px;
background-color: #f00;
}
/* 第一步设置主体容器总宽度,并居中 */
.content {
width: 1000px;
margin: 5px auto;
min-height: 300px;
background-color: aqua;
}
/* 第二步左右两侧固定宽度,中间区块自适应 */
.wrap {
width: inherit;
min-height: inherit;
background-color: bisque;
}
.wrap .main{
padding: 0 200px;
}
/* 设置左右区块的宽度和高度(因为无内容,所以设置了最小高度),并设置参考色块 */
.left{
width: 200px;
min-height: 300px;
background-color: blue;
margin-left:-100%;
}
.right{
width: 200px;
min-height: 300px;
background-color:blueviolet;
margin-left: -200px;
}
.wrap,.left,.right{
float: left;
}
.foot{
width: 100%;
height: 100px;
background-color: black;
}
</style>
</head>
<body>
<div class="head"></div>
<!-- 双飞翼布局 -->
<div class="content">
<!-- 双飞翼dom结构 -->
<div class="wrap">
<!-- 主体必须放到wrap中 -->
<div class="main">main</div>
</div>
<div class="left">left</div>
<div class="right">right</div>
</div>
<div class="foot"></div>
</body>
</html>


Correction status:Uncorrected

Teacher's comments:
Statement of this Website
The copyright of this blog article belongs to the blogger. Please specify the address when reprinting! If there is any infringement or violation of the law, please contact admin@php.cn Report processing!
All comments Speak rationally on civilized internet, please comply with News Comment Service Agreement
0 comments
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!