Home  >  Article  >  Web Front-end  >  A beginner's introduction to CSS: overall declaration of page style

A beginner's introduction to CSS: overall declaration of page style

黄舟
黄舟Original
2016-12-19 16:23:261359browse

 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:

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:


  In this example, we have set three sets of tags

,

, at the same time. In other words, all tags marked by these three tags When wrapped, the text size will be changed to 12pt, the text will be red, and it will be displayed in Song font!

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)!


Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn