【发布时间】:2014-01-16 03:46:30
【问题描述】:
ul li:nth-child(odd){
color:#c0122f;
float:left;
width:48%;
line-height:30px;
font-size:15px;
}
ul li:nth-child(even){
color:#c0122f;
width:48%;
float:right;
line-height:30px;
font-size:15px;
}
我的页面上有六个 li 项目,我想给 3 个放在左侧,3 个应该放在右侧,因为我使用了 nth-child(odd)/ 即使我在我的代码中显示它在 chrome 中工作正常, mozilla 和 ie9 但它会在 ie8 /7 中产生问题
【问题讨论】:
-
ie7/8 不支持nth-child():caniuse.com/#search=nth-child
-
也可以在MDN上查看
标签: css