Source URL: http://www.cnblogs.com/jian1982/archive/2010/07/03/1770349.html
CSS defines the font line spacing line-height:xxpx;
CSS defines font spacing
Let's take a look at the text properties of CSS, or we'll start with a detailed list of text properties:
Property |
attribute meaning |
Property value |
Word-spacing |
Defines the spacing between each word |
Normal<length> must be in the length of the unit |
Letter-spacing |
Defines the spacing between each letter |
Ditto |
Text-decoration |
Define the "trim" style for text |
none|underline|overline| Line-through|blink |
Vertical-align |
Defines the element in the vertical direction On the position |
Baseline|sub|super|top|text-top|middle|bottom|text-bottom <percentage> |
Text-transform |
Convert text to other forms |
Capitalize|uppercase|lowercase|none |
Text-align |
Defines how text is aligned |
Left|right|center|justify |
Text-indent |
Defines how the first line of text is indented |
<length>|<percentage> |
Line-height |
Defines the line height of the text |
normal|<unmber>|<length>| <percentage> |
We can see from the table that here you can define text spacing, letter spacing, decorations, alignment, indentation, and line high properties.
Let's take a look at the following example:
CODE:
<p style= "Letter-spacing:5px;text-align:justify;text-indent:4em;line-height:17pt" > We see more space between the text attributes and the lines between the rows and lines, the alignment becomes justified, and the beginning of the paragraph is indented in two more panes. </p>
Letter-spacing set the word spacing to 5px, where 5px is a unit of length, Text-align is set to justify the alignment, indent sets the indent to 4em;line-height set row height to 17pt
From the above example, we can see that the use of CSS text properties can be easily formatted text in the page.
(go) CSS defines font spacing font line and line spacing