【发布时间】:2012-09-24 22:55:20
【问题描述】:
我正在努力解决这个问题。我有一个article,其中插入了两个元素:before 和:after,它们都绝对位于该文章中。
在除 IE8 之外的所有浏览器中,z-index 堆叠都运行良好。它应该按照从下到上的顺序:
文章内容 > 淡出图像 > 图标
我已经尝试了一些不同的东西,最新的可以在这里看到:http://jsfiddle.net/LtYMV/2/
我正在尝试的基本情况如下所示:
article {
// styles
}
article:before {
// icon background image used on inserted content
}
article:after {
// background image used on inserted content
}
我知道这有一些技巧,我似乎无法通过 z-index 值的任何组合来解决这个问题。感谢您的帮助!
【问题讨论】:
标签: css internet-explorer-8 z-index pseudo-element