css - Chrome 中的 Z-index 重叠问题

标签 css wordpress z-index

在我的网站上,当悬停状态处于事件状态时,我为图像设置了 z-index: 1000,这在 firefox 中效果很好,但在 chrome 中却不行。

请检查 gif:放大的图像显示在文本后面,即使文本 z-index 低于 1000。This is wrong这就是我要存档的内容:showing the image on hover above the text

我的网站是https://pixelbeast.hu

我做错了什么?

最佳答案

您需要将 position: relative; 样式规则添加到您的图像中,以使 z-index: 1000; 有效。

z-index 仅适用于定位元素(position:absoluteposition:relative位置:固定)。

关于css - Chrome 中的 Z-index 重叠问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54913883/

相关文章:

html - Phonegap CSS 背景不显示在 Android 上

jQuery 错误 "x.ready.promise is not a function"和 "Modernizr.prefixed is not a function"/jQuery.noConflict

javascript - 用于翻转的 Z-Index 和 javascript

php - 使用供应商商店名称 (Dokan) 在 WooCommerce 中自定义电子邮件主题

wordpress 上的 CSS 在使用 Chrome 或 Safari 时不正常

css - 视频背景叠加部分

html - 嵌套 UL 中的 Z 索引

html - 如何在网站上使用表情符号字体?

jQuery 切换以更改图像

html - 波浪/曲线模块的