我有一个包含几个ul
个标签的div
标签.
我只能为前ul
个标签设置CSS属性:
div ul:first-child {
background-color: #900;
}
然而,除了第一个标签之外,我下面try 为其他ul
个标签设置CSS属性的try 不起作用:
div ul:not:first-child {
background-color: #900;
}
div ul:not(:first-child) {
background-color: #900;
}
div ul:first-child:after {
background-color: #900;
}
我如何用CSS写:"每个元素,除了第一个"?