A descendant selector is represented by a double-slash: //.
后代选择器用双斜线 // 表示。
When using the descendant combinator, an element selector on the right is selected if it falls anywhere between the tags of the element selector on the left.
当使用后代选择符,右边的一个元素选择器是被选择的,不管左边的元素选择器标签有几个。
In this case, the selector is the ancestor element name followed by the descendant element name.
在这种情况下,选择符是祖先元素名后面跟着后代元素名。
The selector in the following rule, which combines descendant and attribute selectors, matches any element that (1) has the "href" attribute set and (2) is inside a P that is itself inside a DIV
下面规则中的选择符结合了派生选择符和属性选择符,它匹配任何元素,如果(1)该元素设置了"href"属性;且(2)包含在一个P元素内,而P元素又包含在一个DIV元素内
The selector in the following rule, which combines descendant and attribute selectors, matches any element that (1) has the "href" attribute set and (2) is inside a P that is itself inside a DIV
下面规则中的选择符结合了派生选择符和属性选择符,它匹配任何元素,如果(1)该元素设置了"href"属性;且(2)包含在一个P元素内,而P元素又包含在一个DIV元素内
应用推荐