【问题标题】:Sticky footer in Liferay 6.2Liferay 6.2 中的粘滞页脚
【发布时间】:2017-01-31 03:31:53
【问题描述】:

如何在 Liferay 中创建粘性页脚?我已经阅读了很多文档,但都没有奏效。

我有这个在custom.css

#footer {
     background-color: black;
     color: white; 
     font-size: 200%; 
     text-align: center; 
     line-height: 3em; 
     clear: both;
     position: relative; 
     z-index: 10; 
     height: 3em;
     margin-top: -3em;
}

这个在portal_normal.vm:

<div id="footer">Powered by German</div>

在前面提到的问题中,我询问了如何创建页脚并更改其颜色。然后,在评论中,我问了如何创建粘滞页脚,没有得到好的答案,所以我创建了另一个线程。

【问题讨论】:

  • 没有。在我之前的问题中,我询问了如何制作页脚以及如何更改它的颜色。在这个主题中,我试图了解如何制作粘性主题。
  • 在这种情况下,我误解了您上一个问题中的短语I need to make it responsive。顺便说一句 - 这不是 Liferay 特定的,我相信sticky-footer 中的一个答案会帮助你 - 所以仍然是重复的。
  • @TobiasLiefke 您可以尝试所有这些,但没有一个会起作用。
  • @TobiasLiefke 您知道,粘性页脚和响应式页脚之间是有区别的。

标签: liferay footer sticky-footer liferay-theme


【解决方案1】:

好的,我的问题解决了!!!

首先,你应该看看这一行:&lt;div class="container-fluid" id="wrapper"&gt; in portlet_normal.vm:

我们的页脚进入这个类,这样每次都不会在浏览器页面的末尾而是在这个块的末尾。所以你需要关闭那个块并将页脚放在下面:

<div id="footer" class="row-fluid">
    <div class="span12 text-center">
        <p class="powered-by">
            #language ("Powered by Alexandr Boldyrev")
        </p>
    </div>
</div>

然后,您应该更改custom.css 中的页脚参数:

#footer {
     text-align: center;
     background: #FFEFD5;
     position: absolute;
     bottom: 0;
}

就是这样,我们的页脚变粘了!

【讨论】:

    猜你喜欢
    • 2013-11-06
    • 1970-01-01
    • 1970-01-01
    • 2013-01-13
    • 1970-01-01
    • 2012-09-04
    • 2018-07-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多