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)06/01 Report--
This article mainly introduces the relevant knowledge of "what are the selectors of css". The editor shows you the operation process through an actual case, the operation method is simple and fast, and it is practical. I hope this article "what are the selectors of css" can help you solve the problem.
1. Basic selector
1. Id selector (highest priority 0100)
For example, # id {...}
2. Class selector (priority 0010)
For example, .class {.}
3. Tag selector (with the lowest priority of 0001 and the most extensive)
Such as: div {...}
2. Strengthening selector
1. Descendant selector (selector names are separated by spaces)
For example, # wrap p {... id is all p tags under wrap.}
2. Descendant selector (the selector names are connected with the sign greater than'>')
For example, # wrap > p {... id is the descendant p label under wrap.}
3. Combination selector (the selector names are separated by commas',')
For example: # wrap, .con p {... id is wrap and the p tag under the class name con all uses this selector.}
Combination selector means that multiple tags that meet the selector rules adopt the same css style
III. Other enhanced selector
1. Wildcard selector (rarely used, not meaningful)
Such as: * {.}
2. Adjacent selector (also known as adjacent selector, high probability of use, using the plus sign "+" to connect two selectors)
Such as: .con + p {. The sibling p tag named con satisfies this condition. Note that the sibling tag is not allowed.}
3. Pseudo-class selector
For example, .clearfix: after {. Acts on the child tag after the tag named clearfix.}
4. Attribute selector
Tentative explanation
5. Explain the difference between div.wrap and div.wrap.
Note: the writing difference between div.wrap and div.wrap is whether there is a space between div and .wrap.
(1) the div .wrap selector with spaces is the descendant selector we introduced earlier, which means that all tags named wrap under the div tag conform to the filter.
(2) div.wrap without spaces is directly concatenated, meaning that the tag name is div and the class name is wrap.
For example, the div tag of div.con#box {. "Class name is con and id is box" meets the filter.}
This is the end of the content about "what are the selectors of css". Thank you for reading. If you want to know more about the industry, you can follow the industry information channel. The editor will update different knowledge points for you every day.
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.