[英]Fullscreen CSS Layout Challenge (Multi-column w/ Header and Footer)
I've done quite a bit of research on CSS fullscreen layouts I just couldn't seem to find something like what I'm trying to do.我已经对 CSS 全屏布局进行了相当多的研究,但我似乎找不到像我正在尝试做的事情。 I'm looking for a fullscreen layout with a header, footer, multiple columns, and a sidebar.我正在寻找具有 header、页脚、多列和侧边栏的全屏布局。 Here's an ascii model and then a photoshop mockup.这是一个 ascii model 和一个 Photoshop 模型。 Anyone have any ideas?有人有想法么? I'm yet to find a fullscreen layout technique to work.我还没有找到一种可以工作的全屏布局技术。
+-----------------------+-------+
| | |
+-------------+---------+ +
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
+-------------+---------+-------+
| |
+-------------------------------+
So tell me, how do you think this could be accomplished?所以告诉我,你认为这可以如何实现? I'm open to CSS 3 or HTML 5 options as cross-browser compatibility is a bonus, but not a necessity (WebKit is the target platform).我对 CSS 3 或 HTML 5 选项持开放态度,因为跨浏览器兼容性是一个奖励,但不是必需的(WebKit 是目标平台)。
See the below code in action here: http://jsfiddle.net/davinciwanab/nX4eq/请在此处查看以下代码: http://jsfiddle.net/davinciwanab/nX4eq/
<style type="text/css">
* {
margin: 0px;
padding: 0px;
}
#header {
float: left;
width: 75%;
height: 20px;
background-color: #333;
}
#colRight {
float: right;
width: 25%;
height: 500px;
background-color: #CCC;
}
#content {
float: left;
width: 50%;
height: 480px;
background-color: #EEE;
}
#contentRight {
float: left;
width: 25%;
height: 480px;
background-color: #AAA;
}
#footer {
width: 100%;
height: 20px;
background-color: #777;
}
</style>
</head>
<body>
<div id="header"></div>
<div id="colRight"></div>
<div id="content"></div>
<div id="contentRight"></div>
<div style="clear:both;"></div>
<div id="footer"></div>
</body>
here is a rough wireframe这是一个粗略的线框
http://jsfiddle.net/samccone/UYeEr/ http://jsfiddle.net/samccone/UYeEr/
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.