<div id="main">
<p> one </p>
<p> two </p>
<p> three </p>
<p> four </p>
<p> five </p>
<div>
我不想首先应用 css <p>One</p>
p {color:red}
我需要 :first-child
的对面.
最佳答案
p:not(:first-child) { color: red; }
浏览器支持是 very strong现在,但替代方案包括:
p { color: red; }
p:first-child { color: black; }
和:
* + p { color: red; }
关于css - 如何跳过第一个 child ?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2855679/