In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-05 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly introduces the example analysis of CSS advanced grammar, which is very detailed and has certain reference value. Friends who are interested must finish it!
Grouping of selectors
You can group selectors so that grouped selectors can share the same declaration.
Separate the selectors that need to be grouped with commas. In the following example, we group all the title elements. All the title elements are green.
H2,h3,h3,h4,h6,h7 {
Color: green
}
Inheritance and its problems
According to CSS, the child element inherits attributes from the parent element. But it doesn't always work this way. Look at the following rule:
Body {
Font-family: Verdana, sans-serif
}
According to the above rule, the body element of the site will use the Verdana font (if the font exists on the visitor's system).
Through CSS inheritance, child elements inherit attributes owned by the highest-level elements (in this case, body) (such as p, td, ul, ol, ul, li, dl, dt, and dd).
No additional rules are required, all child elements of body should display Verdana fonts, and so should child elements of child elements. And in most modern browsers, this is true.
But this may not happen in the bloody era of browser wars, when support for standards was not a priority for companies. Netscape 4, for example, does not support inheritance, ignoring not only inheritance but also the rules that apply to body elements. There is still a problem with IE/Windows until IE6, and font styles in the table are ignored. What should we do?
The above is all the content of the article "sample Analysis of CSS Advanced Grammar". Thank you for reading! Hope to share the content to help you, more related knowledge, welcome to follow the industry information channel!
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.