In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/02 Report--
This article mainly introduces "what are css3 grammar rules". In daily operation, I believe many people have doubts about what css3 grammar rules are. The editor consulted all kinds of materials and sorted out simple and easy-to-use operation methods. I hope it will be helpful for you to answer the doubts about "what are css3 grammar rules?" Next, please follow the editor to study!
The css3 syntax rule consists of "selector", "attribute" and "attribute value". The selector specifies the object to which the css style encoding is targeted, the attribute is the styling option provided by CSS, and the attribute value is the parameter used to display the effect of the attribute.
The operating environment of this tutorial: windows7 system, CSS3&&HTML5 version, Dell G3 computer.
The style is the minimum syntax unit of CSS, and the CSS syntax consists of three parts: selector, attribute and attribute value.
Selector (Selector)
Specifies that the object for which this set of style codes is to be targeted can be a XHTML tag or a specific id or class tag (preceded by a # logo)
Attribute (Property)
Attributes are the core of CSS style control. For every XHTML tag, CSS provides a wealth of style attributes, such as color, size, positioning, floating mode, and so on.
Property is a set styling option provided by CSS. An attribute name consists of one or more words, which are connected by a hyphen. This can visually represent the effect of the style that the property wants to set.
Attribute value (value)
Refers to the value of an attribute, which is a parameter used to display the effect of a property. It includes numeric values and units, or keywords.
Different writing methods and units of values
In addition to the English word red, we can also use the hexadecimal color value # ff0000:
P {color: # ff0000;}
To save bytes, we can use the abbreviation of CSS:
P {color: # f00;}
We can also use RGB values in two ways:
P {color: rgb (255Power0);} p {color: rgb (100% re0% re0%);}
Note that when using RGB percentages, the percentage symbol is written even when the value is 0. But in other cases you don't need to do this. For example, when the size is 0 pixels, you don't need to use px units after 0, because 0 is 0, no matter what the unit is.
Remember to write quotation marks
Tip: if the value is several words, put the value in quotation marks:
P {font-family: "sans serif";}
CSS Advanced Syntax: 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.
At this point, the study of "what are the grammatical rules of css3" is over, hoping to solve everyone's 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.