css 粘性页脚 - http://9seeds.com/tech/sticky-footer-genesis/
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了css 粘性页脚 - http://9seeds.com/tech/sticky-footer-genesis/相关的知识,希望对你有一定的参考价值。
//* Sticky Footer Functions
add_action( 'genesis_before_header', 'stickyfoot_wrap_begin');
function stickyfoot_wrap_begin() {
echo '<div class="page-wrap">';
}
add_action( 'genesis_before_footer', 'stickyfoot_wrap_end');
function stickyfoot_wrap_end() {
echo '</div><!-- page-wrap -->';
}
html, body {
height: 100%;
}
.site-container {
height: 100%;
}
.page-wrap {
min-height: 100%;
/* equal to footer height */
margin-bottom: -90px;
}
.site-inner {
min-height: 100%;
/* equal to footer height */
margin-bottom: -90px;
}
.site-footer, .site-inner:after {
/* .site-footer and .site-inner:after must be same height as .site-inner */
height: 90px;
}
.site-footer {
background: orange;
/* Use this for testing */
}
以上是关于css 粘性页脚 - http://9seeds.com/tech/sticky-footer-genesis/的主要内容,如果未能解决你的问题,请参考以下文章
Css 粘性页脚 - 响应式
CSS中粘性页脚上方的水平和垂直居中
CSS 粘性页脚,宽度为 100%
css CSS:粘性页脚1
css CSS:粘性页脚2
CSS 粘性页脚CSS