A series of properties can change the size and shape of the page text, as outlined below:
Font-family
Fonts used in text, such as XXFarEastFont-Arial, Times New roman,arial, etc.
This attribute must be detailed, you cannot use remote fonts, you can use safe fonts (such as Arial,verdana and Times New Roman and Arial) to specify many fonts at the same time, as long as you separate them with commas. The intention is that if the user does not have the first font in the Computer browser can use the font specified later. This is useful because different computers have different fonts. Example font-size: arial,helvetica
, PC users can use Arial while Apple Mac users can use Helvetica.
Note: If the name of the font has many words, use a combination of double quotes, for example,font-family: "Times New Romes"。
Font-size
The size of the font, be careful to use. For example, the title will not be the same as the paragraph, it should be in large characters, you can use and h1
h2
so on.
Font-weight
This property determines whether the font is bold. Usually used or in the actual font-weight: bold
application font-weight: normal
. Theoretically can also be bolder
used lighter
100
200
300
, 400
,, ,,,,, 500
600
700
, 800
or 900
, but some browsers do not recognize, still adhere to bold
and normal
.
Font-style
This property determines whether the font is italic, possibly font-style: italic
or font-style: normal
.
Text-decoration
This property determines whether the text needs to be underlined. Can be:
text-decoration: overline
, plus the underlined
text-decoration: line-through
, plus lines that pass through the text.
text-decoration:underline
, this should be used on the link because the user is accustomed to think it represents a link.
Text-transform
Change the situation of the text.
-
text-transform:capitalize
to capitalize the first letter of each word.
-
text-transform:uppercase
, all uppercase.
-
text-transform:lowercase
, all lowercase.
-
text-transform:none;
, this property does not work.
Body { font-family:arial, Helvetica, Sans-serif; font-size:0.8em; } h1 { font-size:2em; } h2 { font-size:1.5em; } a { text-decoration:none; } Strong { font-style:italic;
text-transform:uppercase }
Text Spacing
The
letter-spacing
and word-spacing
properties mean the spacing between letters and text. The value can be either length or normal
. The
line-height
Property sets the row height of an element, such as a paragraph, and does not have the size of the font being adjusted. It can be a number (a multiple of the font size), length, percentage, or normal
.
text-align
Sets the element position, left
, right
, center
, or justify
. The
text-indent
Property indents the first line of a paragraph. This is often set when printing, but is often not used in Web pages.
p {letter-spacing:0.5em; Word-spacing:2em; line-height:1.5;
Text-align:center }