If you must use descendant selectors, prefer child selectors, which at least only require evaluation of one additional node, not all the intermediate nodes up to an ancestor.
如果您必须使用后代选择器,尽量使用子代选择器,这最少只需评估一个额外的节点,而非中间直至祖先的所有节点。
The style defined above will apply to child selectors only when they are inside the parent selector.
在以上的宣告中,只有当子选择器是在父选择器之内时,样式才会被用到。
The style defined above will apply to child selectors only when they are inside the parent selector.
在以上的宣告中,只有当子选择器是在父选择器之内时,样式才会被用到。
应用推荐