In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-22 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly introduces "what is the checked pseudo-class selector in Css technology". In daily operation, I believe that many people have doubts about what the checked pseudo-class selector in Css technology is. Xiaobian consulted all kinds of data and sorted out simple and easy-to-use methods of operation. I hope it will be helpful for you to answer the doubt of "what is the checked pseudo-class selector in Css technology?" Next, please follow the editor to study!
The checked pseudo-class is a great state selector introduced by CSS3 to represent the selected state of the selection box (radio box, check box, or options).
Some readers may wonder that we can also put the initial state in the document (such as selected or checked defined in Section 17.2.1 of HTML4). So strictly speaking: it is true that checked pseudo-classes do not act entirely on information outside the document, but they are essentially a dynamic interaction.
We also learn through an online example: the use of checked pseudo-class, which is a classic pure CSS accordion navigation bar without any js scripts:
And: checked similar dynamic selectors related to the state of UI interface components are: enabled and: disabled, which are less used and will not be covered here.
All of the above are Dynamic pseudo-classes related to the state of the element. in addition, we often use structured pseudo-classes (Structural pseudo-classes), such as first-child.
First-child and: last-child
These two pseudo-classes are related to the HTML element hierarchy. They locate the target element based on the order in which the HTML elements appear in the code. We can think of the order or hierarchical relationship of elements as a special state.
One
Two
Three
Four
Li:first-child {background: greenyellow;}
Li:last-child {background: lightsalmon;}
As you can see, we didn't add class attributes to the first and last elements. Their position in the document defines the application of CSS rules. In such examples, we can achieve the same goal by adding specific classes (class) to these elements, which can help us understand why the above CSS rules for selecting elements by element state or order are called "pseudo classes".
At this point, the study on "what is the checked pseudo-class selector in Css technology" is over. I hope to be able to solve your doubts. The collocation of theory and practice can better help you learn, go and try it! If you want to continue to learn more related knowledge, please continue to follow the website, the editor will continue to work hard to bring you more practical articles!
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.