我正在使用 jekyll-bootstrap 流氓主题,但是在将页脚粘贴到 jekyll-bootstrap 时遇到了很多问题。
有没有办法在这个主题中粘贴页脚?
我正在使用 jekyll-bootstrap 流氓主题,但是在将页脚粘贴到 jekyll-bootstrap 时遇到了很多问题。
有没有办法在这个主题中粘贴页脚?
要使用粘性页脚,您需要修改默认主题模板并添加一些 css。
_include /theme/主题名/default.html:
...
<body>
<div class="wrap">
<!-- navbar and content here! -->
<div class="footer-push"></div>
</div>
<footer>
<div class="container">
<!-- footer here! -->
</div>
</footer>
</body>
...
萨斯代码:
/* Sticky footer */
$footerHeight: 75px;
//Page full height
html, body {
height: 100%;
}
#page-wrap {
min-height: 100%;
height: auto !important;
height: 100%;
// Negative indent footer by it's height
margin-bottom: -($footerHeight);
margin-left: 0;
margin-right: 0;
margin-top: 0;
}
//footer fixed height
.footer-push,
footer {
height: $footerHeight;
max-height: $footerHeight;
overflow: hidden;
}
我已经使用带有粘性页脚的这个主题。
您可以在终端中运行安装它:
rake theme:install git="https://github.com/Miguelos/hooligan.git"
这里有一个 twitter bootstrap 的粘性页脚示例。