带两个液柱(液体
因此,我正在使用的这个Web应用程序有三个垂直列,扩展了整个窗口高度,并且一个页脚div扩展了整个宽度。 布局看起来像这样:
+|+ ---其中+表示液柱, | 意味着一个固定的列,并且-页脚。
我已经完成了使用绝对和相对定位以及使用jQuery进行一些调整的元素定位。 但是我想知道是否有只用CSS做这个的方法。
谢谢!
So, this web application I'm working in haves three vertical columns expanding for the entire window height, and a footer div expanding for the entire width. The layout looks like this:
+|+ ---where + means a liquid column, | means a fixed column, and - the footer.
I've done the element positioning using absolute and relative positioning with some tweaks using jQuery. But I want to know if there is a way of doing this with CSS only.
Thanks!
最满意答案
这忽略了所有不支持box-orient和box-flex属性的浏览器(如IE)。
演示 : http : ///p8vBC/11/
CSS :
html, body { height: 100%; padding: 0px; margin: 0px; } body > #main { display: -webkit-box; -webkit-box-orient: horizontal; display: -moz-box; -moz-box-orient: horizontal; display: box; box-orient: horizontal; height: 100%; margin-bottom: -100px; } footer { height: 100px; box-flex: 1; -webkit-box-flex: 1; -moz-box-flex: 1; } aside { box-flex: 1; -webkit-box-flex: 1; -moz-box-flex: 1; } #content { width: 400px; }HTML :
<div id="main"> <aside id="left"></aside> <div id="content"></div> <aside id="right"></aside> </div> <footer></footer>This neglects all browser not supporting the box-orient and box-flex properties (like IE).
Demo: http:///p8vBC/11/
CSS:
html, body { height: 100%; padding: 0px; margin: 0px; } body > #main { display: -webkit-box; -webkit-box-orient: horizontal; display: -moz-box; -moz-box-orient: horizontal; display: box; box-orient: horizontal; height: 100%; margin-bottom: -100px; } footer { height: 100px; box-flex: 1; -webkit-box-flex: 1; -moz-box-flex: 1; } aside { box-flex: 1; -webkit-box-flex: 1; -moz-box-flex: 1; } #content { width: 400px; }HTML:
<div id="main"> <aside id="left"></aside> <div id="content"></div> <aside id="right"></aside> </div> <footer></footer>#感谢您对电脑配置推荐网 - 最新i3 i5 i7组装电脑配置单推荐报价格的认可,转载请说明来源于"电脑配置推荐网 - 最新i3 i5 i7组装电脑配置单推荐报价格
下一篇:用U盘PE启动安装系统教程
推荐阅读
留言与评论(共有 18 条评论) |
本站网友 北京协和医院地址 | 7分钟前 发表 |
400px; } HTML | |
本站网友 hec | 8分钟前 发表 |
1; } aside { box-flex | |
本站网友 华明镇二手房信息 | 7分钟前 发表 |
但是我想知道是否有只用CSS做这个的方法 | |
本站网友 白兔赤乌 | 23分钟前 发表 |
1; -webkit-box-flex | |
本站网友 挖黄金 | 7分钟前 发表 |
horizontal; display | |
本站网友 空调病 | 29分钟前 发表 |
1; -moz-box-flex | |
本站网友 河西租房信息 | 20分钟前 发表 |
100%; margin-bottom | |
本站网友 颐和园二手房 | 27分钟前 发表 |
+|+ --- where + means a liquid column | |
本站网友 降血糖的蔬菜 | 6分钟前 发表 |
horizontal; display | |
本站网友 拉加德 | 17分钟前 发表 |
0px; } body > #main { display | |
本站网友 cdn服务器 | 20分钟前 发表 |
100px; box-flex | |
本站网友 文华期货行情 | 21分钟前 发表 |
html | |
本站网友 维生素c的作用 | 14分钟前 发表 |
horizontal; height | |
本站网友 再创 | 30分钟前 发表 |
1; -moz-box-flex | |
本站网友 开发商贷款 | 6分钟前 发表 |
horizontal; display | |
本站网友 南京新街口租房 | 23分钟前 发表 |
1; -webkit-box-flex | |
本站网友 安信地板官网 | 12分钟前 发表 |
horizontal; height |