【问题标题】:Set a Footer at the Bottom of the Browser Regardless of Page Height无论页面高度如何,在浏览器底部设置页脚
【发布时间】:2011-06-18 12:00:55
【问题描述】:
  1. 下图为页脚
  2. 黑色箭头表示可展开的内容

div sn-p 如下:

<div id="footer_wrap">
    <div id="footer-left"></div>
    <div id="footer-middle"></div>
    <div id="footer-right"></div>
</div>

整个页脚的宽度是980px 页脚高度为124px

我正在使用 Firefox。

无论页面高度如何,如何设置页脚卡在浏览器底部。

【问题讨论】:

    标签: html css web


    【解决方案1】:

    【讨论】:

    • 链接已失效/导致诈骗
    【解决方案2】:

    使用固定位置,这将相对于窗口定位,因此滚动不会影响它的显示位置。

       position: fixed;
    
       bottom: 0;
    

    【讨论】:

      【解决方案3】:
      position: fixed;
      bottom: 0;
      

      例如here

      【讨论】:

        【解决方案4】:

        我个人觉得这个sticky footer比css sticky footer可靠很多:

        Man in Blue - footerStickAlt

        【讨论】:

          猜你喜欢
          • 2013-02-10
          • 2011-02-04
          • 2016-03-20
          • 1970-01-01
          • 1970-01-01
          • 1970-01-01
          • 1970-01-01
          • 2011-01-14
          • 2016-12-18
          相关资源
          最近更新 更多