CSS nth-child:从第4个元素开始的每个第3个元素

pea*_*o86 1 html css

我正在尝试section从第四个标签中选择每个第三个标签。因此,以下粗体元素将指示我要选择的那些元素:

  1. 部分
  2. 部分
  3. 部分
  4. 部分
  5. 部分
  6. 部分
  7. 部分
  8. 部分
  9. 部分

我尝试了以下代码,但似乎无法正常工作

section:nth-child(3n+1)
Run Code Online (Sandbox Code Playgroud)

Tur*_*nip 5

如果要从第4个元素开始,请+4不要+1

section:nth-child(3n+4) {
  color: red;
}
Run Code Online (Sandbox Code Playgroud)
<section>Section</section>
<section>Section</section>
<section>Section</section>
<section>Section</section>
<section>Section</section>
<section>Section</section>
<section>Section</section>
<section>Section</section>
<section>Section</section>
<section>Section</section>
<section>Section</section>
<section>Section</section>
<section>Section</section>
Run Code Online (Sandbox Code Playgroud)