Home > Article > Web Front-end > A beginner's introduction to CSS: overall declaration of page style
Methods of overall declaration
1. Basically, there are two methods of overall declaration. The first one is to target a label and then set several styles at one time. The second is to set the same style on several labels at the same time. The following example is: "Aim at one label, and then set several styles at once":
body{font-size:9pt;
font-color:red;
background:white}
2. You will find that we also declared: the font size is 9pt, the font color is red, and the background is white. In order to divide these three styles into Separate, we use semicolons ";" to separate them, so that they can work normally! Of course, if you think it is a waste of space to write it column by column, then you can also write it in one line, as follows:
body{font-size:9pt; font-color:red;background:white}
Several labels set the same style
1. We just saw a label setting several styles at the same time. In fact, we also You can set several tags at the same time, for example:
h1,h2,td{font-size:12pt; font-color:red; font-family :宋体}
In this example, we have set three sets of tags
The above is the basic introduction to CSS: the content of the overall statement of page style. For more related content, please pay attention to the PHP Chinese website (www.php.cn)!