This method tells you all information you need to know: whether one node is descendant of an ancestor of the other, whether it is before or after, and so on.
这个方法告诉您所有想知道的信息:一个节点是否是另一个节点的祖先的后代,它是在前面还是后面呢,等等。
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.
如果您必须使用后代选择器,尽量使用子代选择器,这最少只需评估一个额外的节点,而非中间直至祖先的所有节点。
Every simple path from a node to a descendant leaf contains the same number of black nodes.
从节点到后代叶节点的所有简单路径都包含相同的黑节点数。
应用推荐