1

我正在使用 jekyll-bootstrap 流氓主题,但是在将页脚粘贴到 jekyll-bootstrap 时遇到了很多问题。

有没有办法在这个主题中粘贴页脚?

http://themes.jekyllbootstrap.com/preview/hooligan/

4

1 回答 1

4

要使用粘性页脚,您需要修改默认主题模板并添加一些 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"

Bootstrap 粘性页脚

这里有一个 twitter bootstrap 的粘性页脚示例。

于 2014-02-12T19:08:13.473 回答