Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我相信这个 CSS 应该可以解决问题
a:nth-child(-n+10) { color: #4faacb }
JSFiddle
希望这可以帮助
nth-of-type您可以结合使用公式来实现此目的not:
nth-of-type
not
div > a:not(:nth-of-type(1n+11)){ color: red; }
演示在这里。