CSS Grammar Manual (ii) Text properties

Source: Internet
Author: User
Tags manual lowercase relative uppercase letter
css| Syntax

1, letter-spacing

function : Controls the spacing between the letters of the text element, and sets the distance to apply to the entire element.
value :
Normal-the spacing between characters is reset to normal spacing for all fonts and font sizes.
Length-Sets the length of the word spacing, positive indicates the normal length of the inheritance in the parent element, and negative values minus the normal length. Specify the unit of measurement after the number: mm, CM, in, pt (dots), px (pixel), PC (PICA), ex (height of lowercase letter x), EM (width of uppercase letter m).
Example :

Letter-spacing

2, Line-height

function : Sets the line spacing of text in an element.
value :
Normal-normal height, usually 1-1. Twice times the font size, which is the default setting.
Number-Sets the distance for each line of text in the element to multiply this number by the font size. For example, the font size is 10 points and the set Line-height is 2, then the spacing is 20 points.
Length-Sets the spacing in standard units of measure, some are absolute, some are relative, as described in letter-spacing.
Percent-also sets the spacing for the percentage of the font size.

Example : This is the first line.

This is the second line.

This is the third line.

3, Text-align

function : Aligns the text horizontally in the element box.
value :
Left-Right alignment
Right-right-aligned
Center-Center
Justify-evenly distributed, generating rows of equal length
Example :

To the left

Center

to right

4, Text-decoration

function : text decoration, used to control the effects of text elements, especially for eye-catching instructions, warnings, and other text effects.
value :
None-no text decoration, default setting.
Underline-underline.
Overline-underlined.
Line-through-delete line.
Blink-Flashing.
You can combine more than one keyword in the same statement.
Example :

Underline

Overline

5, Text-indent

function : Text indent, used for the first line indent on a paragraph.
value :
Length-Sets the size of the first line indent to a specified unit of measure, some units are relative, some are absolute, and the description section of the Letter-spacing property is seen.
Percent-Sets the first line indent as a percentage of the president.
Example :

The text indent, used for the first line indent of the paragraph.

6, Text-transform

function : Sets the capitalization criteria for one or several elements.
value :
None-does not change the uppercase lowercase of the text.
Capitalize-the first letter of each word in the element is capitalized.
Uppercase-Sets all text to uppercase.
Lowercase-Sets all text to lowercase.
Example :

A text-transform example.

A text-transform example.

A text-transform example.

7, Vertical-align

function : vertical alignment.
value :
Baseline-The lowercase letter baseline for two elements.
Sub-subscript.
Super-superscript.
Top-snaps to the front.
Text-top-align text top.
Middle-centerline alignment.
Bottom-bottom line alignment.
Text-bottom-The letter bottom line alignment.
Percent-the line element baseline is used in combination with the Line-height attribute of the element, based on the parent element baseline.
Example :

a1x2

8, Word-spacing

function : Controls the spacing between element words in text. The spacing you set applies to the entire element, and you cannot insert larger or smaller spacing between words.
value :
Normal-regular spacing.
Length-If the length is positive, the normal length inherited from the parent element is added, minus if it is a negative value.
Example :

A Word Spacing Example







Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.