In CSS, ">" is a child element selector, and the syntax "E > F" is to select the specified child element F of the specified parent element E. The child element selector is somewhat similar to the descendant selector, but the child element selector can only select the next level of elements, while the descendant selector can select n levels of elements below.
The operating environment of this tutorial: Windows 7 system, CSS3&&HTML5 version, Dell G3 computer.
In CSS, the sub-element selector refers to selecting sub-elements that meet the conditions, and you need to use the >
symbol
Syntax:
父元素E > 子元素F
Function: Select the specified child element F
of the specified parent element E. Example:
.box>p{}
in the above code is the child The embodiment of the element selector, the actual effect is only p1 and p3.
Note: The child element selector can only select the next level element, and the descendant selector can select the n level elements below.
(Learning video sharing: css video tutorial)
The above is the detailed content of css>what selector. For more information, please follow other related articles on the PHP Chinese website!