1. Basically, there are two methods for overall declaration. The first is to target a label and then set several styles at a time. The second is to set the same style on several labels at the same time. The following example is: "For a label, then set several styles at once":
The following is the quoted content: <stype="text/css"> body{font-size:9pt; font-color:red; background:white} </style> |
2. You will find that we have also declared: the font size is 9pt, the font color is red, and the background is white. In order to separate these three styles, we use semicolons ";" Separate it so it can work properly! 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:
The following is the quoted content: <style type="text/css"> body{font-size:9pt;font-color:red;background:white} </style> |
Several tags set the same style
1. We have just seen a tag that sets several styles at the same time. In fact, we can also set several tags at the same time, for example:
The following is the quoted content: <style type="text/css"> h1,h2,td{font-size:12pt; font-color:red; font-family:宋体} </style> |
In this example, we have set three sets of tags <h1>, <h2>, and <td> at the same time. In other words, any text wrapped by these three tags will have a text size of 12pt, red text, and Displayed in Song font!