按照我的理解,这段 CSS 应该作用于.num-wrapper 下的第一个.child 元素(也就是<span class='child'>2</span>),但为什么不起作用?(演示效果: https://jsbin.com/zamumatoce/edit?html,css,output)
<div class="num-wrapper"> <span>1</span> <span class='child'>2</span> <span>3</span> <span class='child'>4</span> </div> .child:first-of-type { color: blue; font-size: 2em; } 