首页 > 其他 > 详细

双飞翼布局

时间:2016-12-20 01:33:45      阅读:151      评论:0      收藏:0      [点我收藏+]

描述:两边内容不变,中间内容变化

 

代码:

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title></title>
<style>
*{
margin: 0px;
padding:0px;
}
.content{
width: 100%;
height: 300px;
background-color: grey;
}
.center{
width: 100%;
height: 300px;
background-color: red;
float: left;
}
.child{
height: 100%;
margin-left: 100px;
margin-right: 200px;
}
.left{
width: 100px;
height: 100%;
background-color: blue;
float: left;
margin-left: -100%;
}
.right{
width: 200px;
height: 100%;
background-color: yellow;
float: left;
margin-left: -200px;
}
</style>
</head>
<body>
<div class="content">
<div class="center">
<div class="child">中间内容</div>
</div>
<div class="left">左边内容</div>
<div class="right">右边内容</div>
</div>
</body>
</html>

 

双飞翼布局

原文:http://www.cnblogs.com/mmykdbc/p/6200999.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!