【问题标题】:Distill: Fixing the footer to the bottom of the pageDistill:将页脚固定到页面底部
【发布时间】:2022-01-10 16:55:36
【问题描述】:

我在 R 中使用 Distill 创建了一个网站,但我注意到如果没有足够的内容,页脚会在页面的中间浮动。如何将页脚固定到每一页的底部?

【问题讨论】:

    标签: html r r-distill


    【解决方案1】:

    尝试将其添加到您的样式表中。

    要将页脚固定在网页底部,您可以使用 position: fixed like I have ( Look here )。

    
            #footer {
               
    /* Look here*/ position: fixed;
                padding: 10px 10px 0px 10px;
                bottom: 0;
                width: 100%;
                height: 40px;
               
            }
    
    
    

    【讨论】:

      【解决方案2】:
      footer {
             width: 100%;
             position: fixed;
             bottom: 0;
             left: 0;
             right: 0;
      }
      

      【讨论】:

        猜你喜欢
        • 2013-09-25
        • 2016-12-18
        • 1970-01-01
        • 2015-08-26
        • 1970-01-01
        • 2013-01-24
        • 1970-01-01
        • 1970-01-01
        相关资源
        最近更新 更多