CSS经典布局-圣杯布局、双飞翼布局
圣杯布局的来历是2006年发在a list part上的这篇文章:
In Search of the Holy Grail · An A List Apart Article
圣杯是西方表达“渴求之物"的意思,不是一种对页面的形象表达。
双飞翼据考源自淘宝UED,应该是一种页面的形象的表达。
圣杯布局和双飞翼布局解决的问题是一样的,就是两边顶宽,中间自适应的三栏布局,中间栏要在放在文档流前面以优先渲染。
圣杯布局和双飞翼布局解决问题的方案在前一半是相同的,也就是三栏全部float浮动,但左右两栏加上负margin让其跟中间栏div并排,以形成三栏布局。
不同在于解决”中间栏div内容不被遮挡“问题的思路不一样:
圣杯布局,为了中间div内容不被遮挡,将中间div设置了左右padding-left和padding-right后,将左右两个div用相对布局position: relative并分别配合right和left属性,以便左右两栏div移动后不遮挡中间div。
双飞翼布局,为了中间div内容不被遮挡,直接在中间div内部创建子div用于放置内容,在该子div里用margin-left和margin-right为左右两栏div留出位置。
多
了1个div,少用大致4个css属性(圣杯布局中间divpadding-left和padding-right这2个属性,加上左右两个div用相对
布局position:
relative及对应的right和left共4个属性,一共6个;而双飞翼布局子div里用margin-left和margin-right共2个
属性,6-2=4),个人感觉比圣杯布局思路更直接和简洁一点。
简单说起来就是”双飞翼布局比圣杯布局多创建了一个div,但不用相对布局了“。
具体代码:
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>圣杯、双飞翼</title>
<style type="text/css">
.warp
{
margin: 0;
padding: 0;
}
.box
{
width: 100%;
}
.mian
{
width: 100%;
background: #CCFFCC;
float: left;
}
.inner
{
margin: 0 200px 0 200px;
}
.sub
{
float: left;
width: 200px;
background: #DDDDDD;
margin-left: -100%;
}
.extra
{
width: 200px;
float: left;
background: #CCDD99;
margin-left: -200px;
}
.box2
{
padding-left: 200px;
padding-right: 200px;
}
.mian2
{
width: 100%;
background: #CCFFCC;
float: left;
}
.sub2
{
float: left;
width: 200px;
background: #DDDDDD;
margin-left: -100%;
position: relative;
left: -200px;
}
.extra2
{
width: 200px;
float: left;
background: #CCDD99;
margin-left: -200px;
position: relative;
right: -200px;
}
</style>
</head>
<body>
<div class="warp">
<h3>
双飞翼</h3>
<div class="box">
<div class="mian">
<div class="inner">
我是主流
</div>
</div>
<div class="sub">
我是左边
</div>
<div class="extra">
我是右边
</div>
</div>
<br />
<h3>
圣杯</h3>
<div class="box2">
<div class="mian2">
我是主流
</div>
<div class="sub2">
我是左边
</div>
<div class="extra2">
我是右边
</div>
</div>
</div>
</body>
</html>
运行结果:
aaarticlea/png;base64,iVBORw0KGgoAAAANSUhEUgAABCIAAAC9CAIAAADpzEuBAAAXsElEQVR4nO3dT2icZ54n8Oemg2mMD2IOdhOWEIXCBB3GB5FmCDFLw1ZAdPmwJtA6mSw9Zl2Qvoj1IToZtmAql3ZY1x6Sg2cmdMULYrczUzQrCASSi2IQoyHNMGJwOwymDzo0PtSt9vDW+9b7Vr31R9Lj1J/9fPhCx6W3SnIjys+X3/O8FXoAAABRhXn/AAAAwKpRMwAAgMjUDAAAIDI1AwAAiEzNAAAAIlMzAACAyNQMAAAgMjUDAACITM0AAAAiUzMAAIDI1AwAACAyNQMAAIhsuGYcNzZDmZ2dndLHky/u9/YnfDmEEMJm47j0Bxj7xM3G/pifJezsv/r/YwAAgPOKUTN+ev/bs9SMF1/ff+edva+ed/t/7h7cW1+7/MbNX39y8E+n3V7aPDYbx72Thz8Ll/7DzV9/+s2/vcz9dGoGAAAssmmbpr68szZ2gJBWknGDirKLXn734Ebyimtv/urL571er9fr/ukP3/3j3/63//QX4cqd//Xsh9MnWc3onv7rN59+tP2Xl9fCu4/+qGYAAMBSGK0Z3ef/8Ou/vP34RfKn/pTiyr2D47//cHvrtfXK/W/TK9MJxu0n3ZFXyaQ14/aTbu/F1/f7HSOE9Z8/Our2er0/fHwjP/RYu/wf/8fHac3onv7TwSdJy1i7fHX90u0HD9QMAABYeMM149//7heXQgjh9fvf5kvAZuM47Qvbj0+TS9MHfjooHiWymvE/n9y52u8Yazfuf/0ivWD/zuWrW9sfNj47ePrDabfXG2yaO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VEZDWSrgvzLaK/kyrZMZV/MD++CGGmaUaWs9eMZq0wx8jv17JjasFzrppRa43sUersVpI/5vcpJY0juTSdOoxb+I/pE5NqRuk+KZZK9gbX3wSVbJQa3MSpXd9M/pi/f1QyymjXN9MtVTFrRrOaTkKaO7njIlnNSP9j9BM2REREljXpurA/dkj2OA1u4pR9oF5+n1Iyyki2M12rd2LXjOGfQZYvs9eMwYancQv79Irk68UD2ZM/QKPW6heQGU+OD06cqxrLLf8p3ePuQpseE092KA1qwGFv2vHunWbhiPlUO83D/WoIG/XjrN6kP0ZWM2b4gUVERJYsuU/aHnfaIT0mnpSE4oHsyR+gMXwP3An6NSM9cV56JEOWJmeeZszoVd/iqbNbmXzko/j7rYYsqLO+Dw7uASUiIiKxcsbl4/lv8TTbNKO9e23ykY+xNUYWKa+qZsAs5v/GKiIiIvNej8pKRs1gnub/xioiIiLzXo/KSkbNYJ7m/8YqIiIi816Pykpm1poBAABwQWoGAAAQmZoBAABEpmYAAACRqRkAAEBkagYAABCZmgEAAESmZgAAAJGpGQAAQGRqBgAAEJmaAQAARKZmAAAAkakZAABAZGoGAAAQmZoBAABEpmYAAACRqRkAAEBkagYAABCZmgEAAESmZgAAAJGpGQAAQGRqBgAAEJmaAQAARKZmAAAAkakZAABAZGoGAAAQmZoBAABEpmYAAACRqRkAAEBkagYAABCZmgEAAET2/wDMj+NAXay/CQAAAABJRU5ErkJggg==" alt="" />
CSS经典布局-圣杯布局、双飞翼布局的更多相关文章
- CSS(五)圣杯,双飞翼布局
双飞翼布局 <style> *{ margin:; padding:; } .main{ width: 100%; height: 200px; background: pink; flo ...
- css布局记录之双飞翼布局、圣杯布局
双飞翼布局和圣杯布局是比较常用的布局方式,都是为了实现一行三列,并且两侧列固定宽度,中间列宽度自适应的效果:直接上代码记录下: <!DOCTYPE html> <html lang= ...
- CSS中的圣杯布局与双飞翼布局
一,圣杯布局 1,什么是圣杯布局? 所谓圣杯布局就是用于实现一个两侧宽度固定,中间宽度自适应的三栏布局 2,构建圣杯布局的步骤: 2.1,添加一个容器,在这个容器中添加放三个盒子(左.中.右): 2. ...
- 两列布局(浮动、定位、flex)和三列布局(圣杯、双飞翼、flex)
demo 各种布局演示 https://jsfiddle.net/mayufo/qp890peq/1/ 两栏布局 浮动 <div class="box1"> <d ...
- CSS布局经典—圣杯布局与双飞翼布局
在我之前的博客网页整体布局完全剖析-剖完你不进来看一下么?中总结单列.两列.三列固宽与变宽布局,我还以为已经囊括了所有经典的网页布局方法了呢,当然除了CSS3的弹性盒模型没有涉及到,现在看来确实是自己 ...
- CSS经典布局——圣杯布局与双飞翼布局
一.圣杯布局和双飞翼布局的目的 实现三栏布局,中间一栏最先加载和渲染 两侧内容固定,中间内容随着宽度自适应 一般用于PC网 二.圣杯布局的实现 技术要点: 设置最小宽度min-width 使用floa ...
- 中间自适应,左右定宽的两种经典布局 ---- 圣杯布局 VS 双飞翼布局
一.引子 最近学了些js框架,小有充实感,又深知如此节奏的前提需得基础扎实,于是回头想将原生CSS和Javascript回顾总结一番,先从CSS起,能集中它的就在基础的布局上,便查阅了相关资料,将布局 ...
- CSS布局 -- 圣杯布局 & 双飞翼布局
按照我的理解,其实圣杯布局跟双飞翼布局的实现,目的都是左右两栏固定宽度,中间部分自适应. 但在这里实现起来还是有一些区别的 [圣杯布局] 在这里,实现了左(200px) 右(220px) 宽度固定,中 ...
- CSS之圣杯布局与双飞翼布局
圣杯布局 三行等高 HTML: <!DOCTYPE html><html><head> <meta charset="utf-8"& ...
随机推荐
- HDU-4679 Terrorist’s destroy 树形DP,维护
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=4679 题意:给一颗树,每个边有一个权值,要你去掉一条边权值w剩下的两颗子树中分别的最长链a,b,使得w ...
- rsync 的安装
Server setup 0)yum -y install xinetd vi /etc/xinetd.d/rsync and ensure following: disable = n ...
- Codeforces Round #105 (Div. 2) ABCDE
A. Insomnia cure 哎 只能说英语太差,一眼题我看了三分钟. 题意:给5个数k, l, m, n 和 d,求1~d中能被k, l, m, n 至少一个整除的数的个数. 题解:…… 代码: ...
- intent.addFlags(Intent.FLAG_ACTIVITY_NO_HISTORY);
ActivityA到ActivityBintent.addFlags(Intent.FLAG_ACTIVITY_NO_HISTORY);//ActivityB不加入后退栈android:noHisto ...
- 转载最佳JQuery学习网站
转载文章,原出处: http://www.gbin1.com/technology/jquery/learningjquerywebsites/ jQuery是目前最流行的 JavaScript ...
- JAVA使用EPoll来进行NIO处理的方法(转)
JDK 6.0 以及JDK 5.0 update 9 的 nio支持epoll (仅限 Linux 系统 ),对并发idle connection会有大幅度的性能提升,这就是很多网络服务器应用程序需要 ...
- 教你50招提升ASP.NET性能(六):为了生动的用户体验,总是在客户端验证
(12)For a snappy user experience, always validate on the client 招数12: 为了生动的用户体验,总是在客户端验证 To avoid un ...
- Android真机抓屏- Android Screen Monitor
一般运行Android应用程序有两种方式一种是设置Android虚拟设备模拟器,通过Android Virtual Manger进行管理,一种是插入USB数据线直接真机上进行调试,但是如果电脑配置比 ...
- iOS containsString与rangeOfString
rangeOfString是在 containsString没出来之前 用于查找字符串中是否包含某字符,iOS <8.0 NSString *str1 = @"can you \n s ...
- HTML5----CSS显示半个字符
CSS显示半个字符的基本思路: 就是一个字写两遍,分别显示一半.这里就须要用到CSS伪元素:before和:after,记住这个"伪元素"的"伪"字,表明它本来 ...