<!DOCTYPE html>
<html lang="zh">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>双飞翼布局</title>
<style>
*{
margin: 0;
padding:0;
}
.header,.footer{
float: left;
width:100%;
height: 100px;
background: #89A9BD;
text-align: center;
line-height: 100px;
}
.main,.left,.right{
float: left;
position: relative;
min-height: 300px;
text-align: center;
}
.main{
background: greenyellow;
width: 100%;
}
.inner{
margin-left: 400px;
margin-right: 400px;
min-height: 300px;
}
.left{
width: 400px;
background: #ff0000;
margin-left: -100%;
}
.right{
width: 400px;
background: #E1F2F9;
margin-left: -400px;
}
</style>
</head>
<body>
<div class="header">
header
</div>
<div class="main">
<div class="inner">main</div>
</div>
<div class="left">left</div>
<div class="right">right</div>
<div class="footer">footer</div>
</body>
</html>
双飞翼布局代码实现
最新推荐文章于 2024-08-21 10:36:09 发布