css - 使用 CSS 创建固定的、内容重叠的页脚

标签 css footer

我完全不熟悉 CSS 编码,希望有人能帮助我。当您在移动版页面上向下滚动时,我希望我的图片显示在页脚后面,我该怎么做? This是现在的样子。

这是我的页脚的 CSS 代码:

.Footer{

width:100%;

position:fixed;

top:auto;

bottom:0px;

background-color:rgba(242,231,213,2); }

谢谢。

最佳答案

只需添加一个较高的 z-index 值即可使页脚始终位于所有内容的顶部:

.Footer {
  width: 100%;
  position: fixed;
  top: auto;
  bottom: 0px;
  z-index: 999;
  background-color: rgba(242, 231, 213, 2);
}

如您在此屏幕截图中所见:

enter image description here

您的幻灯片有一个很大的 z-index 值,使它们越过页脚。所以页脚的 z-index 需要更大。

关于css - 使用 CSS 创建固定的、内容重叠的页脚,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47431205/

相关文章:

html - 全屏背景

php - 无法让 4 列页脚工作并响应

c# - 从 C# 中的 .docx 文件的页眉和页脚获取图像

jquery mobile 在键盘时隐藏固定页脚

html - 最小高度 :100% on html `div` messes up footer

html - 如何在不影响导航栏高度的情况下扩展 Bootstrap 导航栏品牌的背景颜色

javascript - CSS 过渡仅在 Chrome 开发者工具打开时有效

css select dropdown 在某些 <option> 上加粗

css - 是否有仅适用于 Google Chrome 的 CSS hack?

html - CSS DIV 导航和正文到页脚