CSS选择器给子节点指定一个范围

清华大佬耗费三个月吐血整理的几百G的资源,免费分享!....>>>

<!DOCTYPE html>
<html>
<head>
  <style>
    /* How to select a range of children
     * (Here, 3rd-7th children, inclusive):
     */
    ul li:nth-child(n+3):nth-child(-n+7) {
      outline: 1px solid #0f0;
    }
  </style>
</head>
<body>
  <ul>
    <li>Child 1</li>
    <li>Child 2</li>
    <li>Child 3</li>
    <li>Child 4</li>
    <li>Child 5</li>
    <li>Child 6</li>
    <li>Child 7</li>
    <li>Child 8</li>
    <li>Child 9</li>
    <li>Child 10</li>
  </ul>
</body>
</html>