Property is the core of CSS style control. For each tag in XHTML, CSS provides rich style attributes, such as color, size, positioning, floating method, etc.
Value (value) refers to the value of the attribute. There are two forms. One is the value of the specified range, such as the float attribute. Only three values of left, right, and none can be applied, such as width. It can be specified using 0-9999, or other mathematical units.
In practical applications, we often use the following similar application forms:
body {background-color:blue;}
Explanation:
The body{} above is a type selector. The so-called type selector refers to the selector that uses the existing tag type in the web page as its name. Body is a tag type in the web page, so is div, and so is span. Therefore, the following selectors are all type selectors, and they will control all bodies, divs, or spans in the page:
body{} div{} span{}
The above is the detailed content of What is the grammatical structure of css?. For more information, please follow other related articles on the PHP Chinese website!