CSS style sheet of CSS Quick Start

Source: Internet
Author: User

In today's web page production, almost all the beautiful pages are used CSS. CSS is the abbreviation for cascading style sheet, and some books translate it into cascading style sheets. With the control of CSS, our web page will give people a pleasing, gonggongzhengzheng feeling, while the color changes in the font also makes the homepage more lively. Although only a short line of more than 10 lines of code, the effect is remarkable. The basic use is to insert a piece of code in the Web page that looks like this:

The following is an example of a more typical CSS code to describe its specific usage.

Example: This section of the code in the middle of a total of seven lines, you can see that the characteristics: the first two lines of the format is p {...} and TD {...}. The following five elements are a: The format of the command Word {...}. The first two lines of the role of the Web page text font, size, color control, and then the five elements is the link to the color and underline the control.

1. Text control

The first two lines in the example:

P {font-family: Song body; font-size:9pt; line-height:12pt; Color: #000000} TD {font-family: Song body; FONT-SIZE:9PT} Description: font-family: XXFarEastFont-Arial (Specifies the font of the page text) font-size:9pt (Specify the font size of the page text, PT is the unit that represents the size) line-height:12pt; (Specify the vertical distance of the line and the row, High) Color: #000000 (Specify the color of the page text, #000000 represent black, hexadecimal number) TD {font-family: XXFarEastFont-Arial; FONT-SIZE:9PT} (Control of text in a Web page form)

2. Link color change and underline control

The following 5 lines in the example indicate:

a:hover {background-color: #ffccff; COLOR: #0080ff}

(hover indicates that the link text background color is #ffccff; the foreground color is #0080ff)

a:link {color: #000000; Text-decoration:none}

(link color is black when link is not accessed, and links are not underlined.)

a:visited {color:gray; Text-decoration:none}

(visited indicates that the link color is gray and the link is not underlined after being accessed.)

a:active {Color:green;text-decoration:none}

(active means that when the mouse clicks, the link color is green and the link is not underlined.)

a:hover {Text-decoration:underline}

(hover indicates that the link underlines when the mouse is indicated)

Comments:

none--not underlined

underline--Underline

overline--Underline

line-through--Underline

The above is a typical section of CSS code, the parameter values in the code can be replaced at will debugging. With the preset settings for CSS, you'll find it easier to make Web pages.

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.