In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-03-26 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/01 Report--
The editor will share with you how css uses cascading layers. I hope you will get something after reading this article. Let's discuss it together.
Layer by layer 1. Basic concept
Cascading gives us more ability to manage the "cascading" part of CSS. Currently, there are several factors that determine which styles will be applied in CSS code, including the masses of selectors and the order in which they appear. Cascading allows us to effectively group (or "layer") CSS. The code in the lower order layer will take precedence over the code in the higher level, even if the selector in the higher layer has a higher weight.
two。 Usage
Let's look at the basic use of cascading layers:
/ * create layers in order * / @ layer reset, base, theme;/* add CSS to each layer * / @ layer reset {} @ layer base {h2.title {font-size: 5remt;} @ layer theme {H2 {font-size: 3remt;}}
The CSS font size declaration in the theme layer overrides the font size declaration in the base layer, although the latter selector has a higher weight.
3. Current state
The latest version of Firefox already supports cascading and can be enabled using flag in Chrome and Edge (cascading is fully supported in the Chrome 99 version). It seems that all major browsers are using this specification, so I hope to get more widespread support as soon as possible.
After reading this article, I believe you have a certain understanding of "how css uses cascading layers". If you want to know more about it, you are welcome to follow the industry information channel. Thank you for reading!
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.