您的位置:首页 > Web前端 > CSS

一幅图学会圣杯布局

2016-03-02 23:28 519 查看


<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Document</title>
<style>
* {
margin: 0;
padding: 0;
}
.out {
/*height: 50px;*/
background: yellow;
padding:0px 210px 0px;
}
.center {
height: 50px;
width: 100%;
float: left;
background: green;
min-width: 300px;
}
.left {
width: 200px;
height: 50px;
background: pink;
float: left;
margin-left: -210px;
}
.right {
width: 200px;
height: 50px;
background: pink;
float: right;
margin-right: -210px;
}

</style>
</head>
<body>
<div class="out">
<div class="left"></div>
<div class="center"></div>
<div class="right"></div>
</div>
</body>
</html>
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  前端 html CSS 布局