首页 > 其他 > 详细

圣杯布局

时间:2016-09-19 19:15:27      阅读:112      评论:0      收藏:0      [点我收藏+]

<margin>外边距<padding>内边距

<width>宽度<height>高度

<top>上<bottom>下<left>左<right>右

<position>位置<relative>相对<absolute>绝对<fixed>固定<float>浮动

<background>背景

《圣杯布局》

<!doctype html>
<html>
<head>
<title>圣杯布局</title>
<style>
.zj{
min-height:200px;
margin:0 150px 0 300px;
}
.zhong,.you,.zuo{
min-height:200px;
float:left;
position:relative;
}
.zhong{
width:100%;
min-height:200px;
background:#ff0000;
}
.zuo {
width: 300px;
min-height: 200px;
background: #0026ff;
margin-left:-100%;
position:relative;
left:-300px;


}
.you{
width:150px;
min-height:200px;
background:#00ff21;
margin-left:-150px;
position:relative;
left:150px;
}
</style>
</head>
<body>
<div class="zj">
<div class="zhong">中</div>
<div class="zuo">左</div>
<div class="you">右</div>
</div>

</body>
</html>

效果图:

技术分享

圣杯布局

原文:http://www.cnblogs.com/luchengming/p/5885941.html

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