我正在使用 IE7 的特殊选择器 *+html 对 IE7 进行一些改编:-)
这是在 chrome 中显示的 CSS 代码...我确实不想看到它,除了 IE7:
*+html .container, .ui-listview {
position: relative;
top: 41px;
}
我将其他 css 与 *+html 一起使用,它只能由 IE7 读取,但下面的 css
感谢帮助我!
最佳答案
您正在使用 grouping operator :
When several selectors share the same declarations, they may be grouped into a comma-separated list.
In this example, we condense three rules with identical declarations into one. Thus,
h1 { font-family: sans-serif } h2 { font-family: sans-serif } h3 { font-family: sans-serif }
is equivalent to:
h1, h2, h3 { font-family: sans-serif }
所以这段代码:
*+html .container, .ui-listview {
position: relative;
top: 41px;
}
...等同于:
*+html .container{
position: relative;
top: 41px;
}
.ui-listview {
position: relative;
top: 41px;
}
这解释了 .ui-listview
不受 *+html
的影响。
关于css - 为什么我的 *+html CSS 在 IE7 中工作,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18231960/