【发布时间】:2016-11-17 20:39:13
【问题描述】:
我想像在this 网站上一样创建页脚效果。我想我的内容需要一个包装器,然后添加页脚。
所以结构是这样的:
<div class="content"></div>
<div class="footer">
<div class="footer-content">
</div>
</div>
和 CSS 类似:
.footer{
width: 100%;
}
.footer-content{
position: fixed;
bottom: 0;
width: 100%;
z-index: 0;
}
.content{
z-index: 9999 !important;
background-color: #fff;
position: relative;
margin-bottom: 600px; //height of my full footer
}
但是这不会产生这种效果。请帮助并为我的英语感到抱歉。
【问题讨论】:
-
阿米尔,是对的。此外,您的代码应该可以工作。
-
Amir 发短信说固定背景图片 - 我想要整个页脚固定效果(带内容)。
-
很接近了,这里有一个小提琴:jsfiddle.net/jrgaoztp