Speaking of CSS, I use most of its typographical and font design functions. Because web pages still need to be viewed by others, and information should be transmitted to the other party. Therefore, in any case, this form of transmission is very important. Specifically, that is, the control of words and layout. Another important reason is that Chinese is quite difficult to handle, and there are few Chinese character libraries that come with Windows, and the artistic effects of Chinese are very difficult. It is far better to simply write a few words in English. Therefore, the help of CSS is more necessary. Okay, you don't need to talk about it anymore. Let's take a look at the effect of CSS on words.
First, let's talk about some of the font functions of style sheets. In general, mainly font, size, Weight, Variant, Style, and Decoration) and Case (Case. The following is a detailed introduction. Please note that the styleexample used in this document is the form of external file calling and only the content of external file css1.css. If you want to use them, add <link rel = stylesheet href = "CSS1.CSS"> in the file header description of the HTML file as described in the preceding section.
Okay. Here is an example:
The code is as follows: |
Copy code |
P { Text-align: left; Font-size: 25pt; Font-family: "", "family "; Letter-spacing: 3px; Color: navy; Line-height: 30pt; Text-indent:. 5in; Border: solid 2pt; }
|
Now I will explain the above code. First, P indicates the definition of the content in all <p> </p> containers in the file. The value specified for each attribute is enclosed in braces. A defined format is often:
Attribute: value
Separated by semicolons.
Text-align: left indicates that the section is left aligned, font-size: 15pt, indicating that the font size is 15pt, font-family:, and indicates the font used. Several fonts are used and separated by commas (,) to indicate the first, second, and third fonts. That is to say, if the first font exists in the client system, use it, if you have not checked the second and third types, use the default font if none of them exist. Letter-spacing: 3px indicates that the width between words is 3px. color: navy indicates that the color is sky blue, and line-height: 12pt indicates that the row height is 12pt (the row height here is calculated together with the word height ). Text-indent:. 5in indicates the indent of the first line of a paragraph. Here is. 5in. border: solid 1pt, which indicates that the border is a solid border with a width of 1 pt.