In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)05/31 Report--
This article mainly explains what pseudo-classes and pseudo-objects in css refer to. Interested friends may wish to take a look. The method introduced in this paper is simple, fast and practical. Let's let the editor take you to learn what pseudo-classes and pseudo-objects refer to in css.
In css, pseudo-class means to define the special state of elements, and you can add some special effects of selectors, which are some features and functions given by css built-in class css itself; pseudo-object is the meaning of adding special effects to some selectors, and the effect can be achieved by adding actual elements.
The operating environment of this tutorial: windows10 system, CSS3&&HTML5 version, Dell G3 computer.
What do pseudo-classes and pseudo-objects mean in css
Pseudo class
Css pseudo classes are used to define the special state of an element
The CSS pseudo-class is used to add some special effects of selectors.
Explanation: pseudo-classes can be dynamic in the sense that an element can get or lose a pseudo-class when the user interacts with the document. The exception is that ": first-child" can be inferred from the document tree, and ": lang" can be inferred from the document tree in some cases.
As you can see, its function is similar to that of class, but it is based on an abstraction outside of the document, so it is called a pseudo-class. [1]
Pseudo classes are:: first-child,: link:,vistited,:hover:,:active,:focus,:lang,:right,:left,:first
What is a pseudo class? That is, the css built-in class css itself gives it some features and functions, that is, you no longer have to class=... Or id=... You can use it directly, and of course you can change some of its properties, such as a:link {color:#FF0000;}.
Many of CSS's suggestions are not supported by browsers, but there are four pseudo-classes that can be safely used on hyperlinks.
The syntax of the pseudo class:
Selector:pseudo-class {property: value;}
Pseudo object
Pseudo elements: used to add special effects to some selectors
Css pseudo-elements represent child elements of an element that, although logically present, do not actually exist in the document tree.
Pseudo elements are used to create elements that are not in the document tree and add styles to them. In fact, pseudo-elements are things that cannot be done by a normal selector in front of or behind some elements. The content and elements of control are the same, but it itself is an element-based abstraction and does not exist in the document structure. For example, we can add some text in front of an element and style it by: before.
Syntax for pseudo elements:
Selector::pseudo-element {property:value;} tag: pseudo element {property: value;}
The CSS class can also be used with pseudo elements:
Selector.class::pseudo-element {property:value;} tag class: pseudo element {property: value;} at this point, I believe you have a deeper understanding of "what pseudo classes and pseudo objects in css refer to". You might as well do it in practice! Here is the website, more related content can enter the relevant channels to inquire, follow us, continue to learn!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.