【发布时间】:2013-03-12 12:18:47
【问题描述】:
大家好,我有以下内容..
.selected2:first-child{
background: url(../img/css/first-selected.png) no-repeat !important;
background-position: center center !important;
box-shadow: inset 1px 1px 5px 2px rgba(221,221,221,1) !important;
}
.selected2{
background: url(../img/css/second-selected.png) no-repeat !important;
background-position: center center !important;
box-shadow: inset 1px 1px 5px 2px rgba(221,221,221,1) !important;
}
.selected2:last-child{
background: url(../img/css/third-selected.png) no-repeat !important;
background-position: center center !important;
box-shadow: inset 1px 1px 5px 2px rgba(221,221,221,1) !important;
}
它在 ie9、chrome、opera、firefox 中完美运行……但在 ie8 中,我只能在每个 li 元素上获得第二个背景。
有什么问题? ie8不支持一胎?
【问题讨论】:
-
更好的答案会给这个网站quirksmode.org/css/selectors
-
感谢您的回答。
-
快速谷歌搜索会回答你的问题。不。只有
:first-child在某种程度上兼容IE8。见这里:quirksmode.org/css/selectors
标签: html css internet-explorer-8