Home >Web Front-end >CSS Tutorial >What does css double colon mean?
What does css double colon mean?
css double colon is a pseudo element. The content controlled by the pseudo element is the same as the content controlled by an element. However, the pseudo element does not exist in the document tree and is not a real element, so it is called a pseudo element.
Pseudo elements include: :first-line, :first-letter, :before, :after (in the CSS2.0 Chinese manual compiled by Su Chen Xiaoyu, :first-line, :first-letter are listed as Pseudo-class should be an error in understanding)
Reminder, if your website only needs to be compatible with webkit, firefox, opera and other browsers, it is recommended to use double colons for pseudo-elements. If it has to be compatible with IE browser , it is safer to use CSS2 single colon writing method.
Different from pseudo-classes that target elements in a special state, pseudo-elements operate on specific content in the elements. The level they operate is deeper than that of pseudo-classes, so its dynamics are Pseudo-classes are much lower.
In fact, the purpose of designing pseudo-elements is to select the first letter (letter) and first line of element content, and select the front or back of certain content, which is something that ordinary selectors cannot do.
The content it controls is actually the same as the element, but it is only an abstraction based on the element and does not exist in the document, so it is called a pseudo element.
The above is the detailed content of What does css double colon mean?. For more information, please follow other related articles on the PHP Chinese website!