Introduction to Text (text) properties in CSS

Source: Internet
Author: User
Tags lowercase
This article gives you the content is about CSS text (text) attributes of the introduction, there is a certain reference value, the need for a friend can refer to, I hope you have some help.

One, color text colors

notation: Body{color:red},h1{color: #ooffoo},h2{color:rgb (255,0,0)}

Second, the Text-align text alignment method

Wording: text-align:center;right;left;justify;

Where jusitify means each line is expanded to equal width, and left and right margins are aligned

Third, text-decoration text decoration

notation: Text-decoration:none (default); Overline;line-through;underline;blink;inherit;

Iv. Text-transform Text Conversion

notation: Text-transform:none (default), uppercase (uppercase letters only), lowercase (lowercase letters only), capitalize (each word starts with a capital letter); inherit;

V. Text-indent text Indent

notation: text-indent:0 (default = 0); length;% (percentage); inherit;

Six, word-spacing text interval

notation: text-spacing:normal (default, Standard space); length;inherit;

Seven, Line-height

notation: Line-height:normal (default, reasonable line spacing); Number (numbers will be multiplied by the current font size to set the line spacing); length;%;inherit;

Viii. direction Text Direction

notation: direction:ltr (default, left to right), RTL (right to left); inherit;

Nine: letter-spacing character spacing

notation: Letter-spacing:normal (default), length (defines fixed space, allowable negative value); inherit;

Ten: Text-shadow text Shadow

notation: Text-shadow:none (default); H-shadow (required. Horizontal shading allows negative values); V-shadow (required.) Vertical shading allows negative values); Blur (optional, blurred distance); color (optional, shadow colors)

eg

h1{text-shadow:2px 2px #ff0000;}

Xi. Unicode-bidi is used with the direction property to set or return whether text is overridden to support multiple languages in the same document.

notation: Unicode-bidi:normal (default, no additional embedding layer); Embed (creates an additional embedding layer); Bidi-override (creates an additional embedding layer. Reordering depends on the properties of the direction. ); Initial (set the element to its default value); inherit;

12, Vertical-align vertical alignment

notation: Vertical-align:baseline (by default, the element is placed on the parent element's baseline), sub (subscript for vertical alignment), super (superscript of vertical aligned lines), top (aligns the top of the element to the top of the highest element in the row) Text-top (aligns the top of the element with the top of the parent element's font), middle (places the element in the middle of the parent element), bottom (aligns the top of the element to the top of the lowest element in the row), Text-bottom (aligns the bottom of the element with the bottom of the parent element's font) ; length;% (use the percent value of the "Line-height" property to arrange this element.) negative values allowed); inherit;

13, White-space How to deal with the whitespace within the specified element

notation: White-space:normal (default.) The blank will be ignored by the browser. ;p re (blank will be reserved by the browser.) It behaves like a <pre> tag in HTML); nowrap (the text does not wrap, the text continues on the same line until the <br> tag is encountered), pre-wrap (preserves the whitespace sequence, but wraps normally);p Re-line ( Merge white-space character sequences, but keep newline characters); inherit;

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.