【问题标题】:Footer overlaps with the content页脚与内容重叠
【发布时间】:2017-06-16 13:55:42
【问题描述】:

当我尝试将位置从相对位置更改为绝对位置时,我希望页脚在底部保持粘性(即使用户缩小 25%),但页脚与内容重叠。

如何解决这个问题?这是我的直播link

CSS:

footer #bottom-footer {
    background: url(/files/image.jpg) no-repeat;
    background-repeat: no-repeat;
    background-size: cover;
    box-shadow: inset 0 0 0 1000px rgba(0, 0, 0, 0.71);
    text-align: left;
    padding: 50px 0 50px 0;
    font-size: 0.8125em;
    font-family: 'Open Sans', sans-serif;
    font-weight: 600;
    letter-spacing: normal;
    position: relative;
    left: 0;
    bottom: 0;
    height: auto;
    width: 100%;
}

【问题讨论】:

    标签: css footer sticky sticky-footer


    【解决方案1】:

    我猜你的意思是页面底部的内容在固定页脚下方。

    一种解决方法是将页脚的宽度添加到页脚父级的底部。

    【讨论】:

    • 为什么要使用页脚的宽度?当我在浏览器上使用宽度时,它接近 3500 像素。
    猜你喜欢
    • 2018-10-25
    • 1970-01-01
    • 2020-03-31
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2011-11-19
    • 2013-02-15
    相关资源
    最近更新 更多