5_css control text and links. txt

Source: Internet
Author: User

CSS Control font

1. Set the font size font-size:12px

2. Set the character color color:red

3. Set Font font-family:arial, ' Arial '

4. Set the row height line-height:150%

Line-height:1.5em

5. Set the font weight font-weight:normal/bold


6. Set font style font-style:normal/italic (Italic)

7. Modifier text text-decoration:none (normal)/underline (underline)/overline (underline)/line-through (strikethrough)

8. Character Spacing letter-spacing:normal/length (unit of length)

9. Word Spacing word-spacing:normal/length (unit of length)


-----------------


CSS control text

1. Setting the indent text-indent:2em of text in an object can be negative

2. Text horizontal alignment text-align:left/center/right

3. Blank handling in Objects white-space:normal (line wrap)/pre (newline and Blank protected)/nowrap (forced to display on the same line)

4. Text case Control text-transform:none (normal size)/capitalize (the first letter of each word goes in uppercase)/

Uppercase (converted to uppercase)/lowercase (turns into lowercase)

5. Vertical alignment of elements vertical-align:sub (set text to subscript)/super (set text to superscript)/

Top (aligns the top of the element to the top of the highest element in the row)/

Text-bottom (aligns the bottom of the element with the bottom of the parent element's font)



----------------------


CSS control links----CSS Pseudo- class--->l v h a

1. Non-accessible links a:link{color:black;}

2. Visited link a:visited{color:red;}

3. Move the mouse over the link a:hover{color:blue;}

4. Mouse down the link a:active{color:green;}


Note The order of use: L v H a



Other pseudo-classes:

1. Custom Pseudo-Class:

Pseudo-classes can be used in conjunction with CSS classes:

a.red:visited {color: #FF0000}

<a class= "Red" href= "css_syntax.asp" >css syntax</a>

If the link in the example above is accessed, it will appear in red.


2.focus

The style of the focus setting object when it becomes the input focus (the object's onfocus event occurs)

such as: Input:focus{background: #CCFFFF;} /* The input box becomes the focus */


5_css control text and links. txt

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.