css>what selector

青灯夜游
Release: 2021-04-20 18:22:04
Original
2625 people have browsed it

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.

css>what selector

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
Copy after login

Function: Select the specified child element F

of the specified parent element E. Example:



	
		
		
		
	

p1

p2

p3

Copy after login

.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!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact [email protected]
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!