请先看代码:
如上代码,如果把 input 去掉,第一个 section 才会受到响应 border-top:none;。
所以 .section:first-child 的实际逻辑时:
请继续阅读:first-child 与 first-of-type 的区别。