当我尝试将一个元素放在我的 jQuery Cycle 元素之上时,它不起作用。该元素始终位于 jQuery 循环元素之后。我使用 float :对;定位元素,并将其 z-index 设置为 100000,但无济于事。
Firebug 将 Cycle 元素及其子元素视为具有低 z 索引,并显示 float 元素位于正确的位置。
该元素从不显示在骑行图像上方。
<!-- the cycling set -->
<div id='headerimages'>
<img src='images/header1.jpg' alt='' style='' />
<img src='images/header2.jpg' alt='' style='' />
<img src='images/header3.jpg' alt='' style='' />
</div>
<!-- the floating element -->
<img src='images/logotransparent.png' alt='' id='logo' />
最佳答案
float 不会触发 z-index,只会触发
position:relative
和position:absolute
所以试试这些..你可能想尝试添加position:relative
,
它在大多数情况下不会产生任何影响,但会让您访问 z-index
关于jQuery Cycle插件z-index float 问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/877349/