简体   繁体   English

zurb基础的基本布局

[英]Basic layout with zurb foundation

I'm trying to create layout using zurb foundation. 我正在尝试使用zurb基础创建布局。

Currently, I've got very basic one, but one feature blocks me on that very beginning. 目前,我有一个非常基本的功能,但是其中一个功能使我一开始就受阻。 I'd like to make my <main> section to take at least 100% - header height - footer height, so <footer> would be on the bottom of the screen (or, if there is too much content, then you'd have to scroll down to see footer) I created (as I said before, very basic version) here: http://jsfiddle.net/42VcD/2/ 我想让我的<main>部分至少占据100%-页眉高度-页脚高度,因此<footer>将位于屏幕底部(或者,如果内容太多,则您会必须向下滚动才能看到页脚)是在这里创建的(如我之前所说的,非常基本的版本): http : //jsfiddle.net/42VcD/2/

I'm not sure if it's possible without JS, but I'd much more prefer CSS based solution. 我不确定没有JS是否有可能,但是我更喜欢基于CSS的解决方案。

Here is a sample for what you are looking, however its not done in foundation. 这是您正在寻找的示例,但是它并不是在基础上完成的。

http://codepen.io/tusharbandal/full/lmrgD http://codepen.io/tusharbandal/full/lmrgD

Its done using position: absolute to footer . 它使用position: absolute来完成position: absolutefooter

Importantly you done need js for that. 重要的是,您确实需要js。

Even if content increases the footer move down. 即使内容增加,页脚也会向下移动。

you can specify the height for the main section to your requirement. 您可以根据需要指定主要部分的高度。

here is a fiddle with a class(main) for section 100%. 这是一个小提琴,其中有一个课程(主要)为100%。 link 链接

.main{
height:100%;
}

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM