sass compass
@import "compass/layout"
@include sticky-footer(footer-height(px),"content-class”,“bump-class”,"footer-class")
原理基本上是 创建一个占满屏幕的盒子,然后通过margin-top 负值让底部空出一部分,然后用footer去填充
html:
test
sss
.content {
clear: both;
min-height: 100%;
height: auto !important;
height: 100%;
margin-bottom: -40px; }
/line 18, ../../../../tools/koala/Koala/rubygems/gems/compass-core-1.0.1/stylesheets/compass/layout/_sticky-footer.scss/
.content .test {
height: 40px; }
/line 20, ../../../../tools/koala/Koala/rubygems/gems/compass-core-1.0.1/stylesheets/compass/layout/_sticky-footer.scss/
.footer {
clear: both;
position: relative;
height: 40px; }
css