What are CSS Text properties? Introduction to CSS Text properties

Source: Internet
Author: User
Tags dashed line

What are the text properties in CSS styles? What are the uses of each CSS Text property? This article will bring you about the CSS text properties of the introduction (with code), there is a certain reference value, the need for friends can refer to, I hope to help you.

1. The text of the CSS text attribute is converted to uppercase and lowercase letters-text-transform
Property value:
Uppercase; (all caps)
lowercase; (all lowercase)
Capitalize; (in all lowercase words, capitalize the first letter)

p{    Text-transform:uppercase;}

2, CSS text attributes Text Center--text-align
Property value:
Center (center)
Left;
Right (align to left)

p{    Text-align:center;}

3, CSS text attributes of paragraph indentation-–text-indent
EM (in words), ± all can

p{    Text-indent:3em;}

4.css Text properties Set text decoration effect--text-decoration
Property value:
None (remove the underscore)
Underline (underlined)
Overline (plus dash)
Line-through (add Strikethrough)

a{    Text-decoration:none;}

5.css Text properties Set paragraph line height--line-height
Attribute values: percent, PX, number

a{    line-height:13px;}

Set word spacing for 6.css text properties
Word-spacing (only useful in English)
Letter-spacing (both Chinese and English are available)

p{    letter-spacing:16px;}

Paragraph spacing of 7.css text attributes-margin

p{    margin:66px;}

8.css Text attribute Border--border
There are three attribute values: size, color, style;
Border styles are: solid (solid), dashed (dashed line), dotted (dotted)

p{    border:3px lightgreen Solid;}

9.css Text attribute Space--white-space
Property value:
Pre; (as with presets)
nowrap; (text does not wrap)
Inherit; (Inherit parent)
normal; (show one)

p{    White-space:pre;}

10.css Text property settings IME status-ime-mode
Property value:
auto; default
active; Activate local language input method;
Inactive: Activate non-native language input method;
Disabled, forbidden Input method, cannot input Chinese characters

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.