在这里有一个网站:http://www.bigideaadv.com/big_idea_v2/#blog
我遇到的问题是博客有一个高度为340px的div和一个固定的背景附件。
.full-fixed-background {
position: relative;
width: 100%;
height: 340px;
background: url("images/blog_slide.jpg") 0 0 repeat fixed;
background-attachment: fixed;
background-size: 100% auto;
z-index: 3000;
}如果我将位置从相对位置更改为静态位置,则会显示背景,但页面顶部的徽标会显示在其上方。从顶部徽标开始css如下:
.floating-logo {
display: block;
position: absolute;
top: 50%;
height: auto;
text-align: center;
z-index: 2500;
margin-top: -94px;
margin-left: -356.5px;
left: 50%;
width: 715px;
}
.floating-logo img {
display: block;
position: fixed;
margin: 0 auto 0 auto;
width: 715px;
height: auto;
z-index: 2500;
}有人可以提供帮助而不是修复z-index问题吗?提前谢谢。
发布于 2013-11-09 03:38:18
Z索引仅适用于定位的元素(位置:绝对、位置:相对或位置:固定)
将忽略元素position:static;上的Z索引
https://stackoverflow.com/questions/19866982
复制相似问题