In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-02 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/01 Report--
Today, I would like to share with you the relevant knowledge of how css grammar rules are composed. The content is detailed and the logic is clear. I believe most people still know too much about this, so share this article for your reference. I hope you can get something after reading this article. Let's take a look at it.
Css is mainly composed of two parts, the first is the selector, the second is the declaration, the declaration may be one or many, the css selector is the html in which we change the style, and each declaration is composed of an attribute and a value. The main syntax of css is:
Selector {declaration1;declaration2;...declarationN}
Here we can illustrate the rules of css through a case study:
H2 {color:red;font-size:16px;}
In the above code, H2 is the selector, the declaration in curly braces is the attribute and value, where color is the attribute of css, red is the value, there are several ways to write the value, we know that there are several ways to write the value, we can also use hexadecimal # ff0000 to express it, of course, we want to use fewer bytes, we can also use css abbreviation, sometimes we can also use rgb percentage When using a percentage, we have to write a percentage symbol.
The most important point of css is multiple declarations, if you want to define several declarations, we can use the declaration symbol to separate, the last attribute does not need to add a semicolon, the semicolon is a separator in English, not a closing symbol, but many experienced people like to add a separator, which may reduce our chances of making mistakes. For example:
P {
Text-align:center
Color:black
Font-family:arial
}
Finally, we must note that spaces and case, many styles are more than one declaration, so do not appear spaces, if css involves working with html, class in css is very sensitive.
These are all the contents of this article entitled "how css Grammar rules are formed". Thank you for reading! I believe you will gain a lot after reading this article. The editor will update different knowledge for you every day. If you want to learn more knowledge, please pay attention to 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.