<分区>
编辑问题以包含 desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem .这将有助于其他人回答问题。
关闭 8 年前。
<分区>
编辑问题以包含 desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem .这将有助于其他人回答问题。
关闭 8 年前。
我有一个实时网站 http://getfreekidsmusic.com/christmassongs2 和
http://getfreekidsmusic.com/christmassongs1/
我希望 Logo 位于 .content div 之上。我主要使用 Google Chrome DT,因为我更喜欢它而不是 FF fire-bug,但我也有 FF,在 chrome z-index 和其他 css 中呈现我想要的方式,但在 Firefox 中没有 z-index 和元素没有给出索引,正常显示。
无论如何,我已经在浏览器堆栈中对其进行了测试,它向我展示了整个网站需要做一些工作才能真正跨浏览器。 我自己开发了 css,然后吸收了 bootstrap,这就是 css 文件如此困惑的原因,目前我正在重写和调整 css,但我不知道为什么 z-index 在 Chrome 之外不起作用。
最佳答案
我使用 FF 的 Firebug 浏览了您的网站,问题不是 z-index,而是 Logo 的包装 div。当我如下更改这些属性时,FF 起作用了:
#logo img {
margin-bottom: -100px;
position: static;
width: 100% !important;
}
关于html - Z-index 仅适用于 chrome,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27359320/