<style>
    ul li{color:#ddd}
    ul li:nth-child(1){color:#ee1313;}
</style>
<ul>
    <li>1</li>
    <li>2</li>
    <li>3</li>
</ul>

//运行结果1为红色,2,3为灰色

 

相关文章:

  • 2021-11-23
  • 2021-08-01
  • 2021-12-28
  • 2022-02-08
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-10-19
猜你喜欢
  • 2021-12-28
  • 2022-01-29
  • 2022-12-23
  • 2021-12-28
  • 2021-12-28
相关资源
相似解决方案