2014 Sinsing Interpreting CSS Section III

Source: Internet
Author: User

In the second section we are almost all the CSS selector, then the following section we will talk about the color of CSS and some of the text, although I am not sensitive to color, but the colors are more interesting.

The color *********** in CSS

1. Speaking of color, have to Newton, is simply great, the dispersion of light, a very big breakthrough, it can be said that it is a person to complete a few generations have not completed the work.

2. The following is the three primary colors: that is, red and green blue, that is, RGB, we define a color in the CSS can be used in the way of the three primary colors of their own color, you can also use some such as red,green, such as the more classic color.

3. To match the color, we first need to start with a # and then follow the three double-digit 16 notation, the so-called hexadecimal, that is, each from 0 to F, which includes 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, F.

4. Where #000000 is black, #FFFFFF是白色, #FFFF00是黄色, #CCCCCC是一款比较经典的灰色, about how to color, I have not had a good experience to share with you, in short, the larger the value, the lighter the color, the lower the value, the darker the color.

5.CSS this color combination can produce about 160,000 colors, and most of these can be interpreted correctly by the browser.

Style of text *********

1. Although the layout of the site of the pursuit of diversification, but the text information is still indispensable, the following we say in the text of the use of CSS.

2. About color, using the Color property, you can specify the color of the text, I think you should know how to use it.

The 3.text-align property refers to how the text is to be set to left (in the leftmost), right (top), center (center), Justfy (each line is expanded and the width is equal, left and right margin aligned).

4.text-decoration refers to the decoration used to set or delete text, and its most classic application is to remove the underline of the hyperlink, as follows:

{text-decoration:none;}

5. Above we have removed the underline of hyperlinks, for example we can also set the following:

1 P{text-decoration:overline;}2 P{text-decoration:Line-through;}3 P{text-decoration:Underline;}

The first is to add an underscore, the second is an underscore, the third is to add an underscore, but the underline with a wide range of people are better to accept, underlined and underlined a little strange feeling.

6. We can also set the size of letters, indentation, and so on, I feel that these are not very important to Chinese, but the English site is quite suitable, do not speak.

Font **************

1.CSS we can set the relative freedom of the font, we can use font-family to specify the font name, I do not have a lot of research on the font, I know a few.

2. We can use the font-size to specify the font size, we can use PX representation, that is, the format of the pixel. Browser has a default size, the size of normal text is 16px, we can use Font-size to specify the size of the font.

3. In addition to using the PX to specify the size of the font, you can also use EM to specify the size, EM size units by the proposal, 1em equivalent to 16px, that is, we want to use 40px, is to use 2.5em.

4. We can use Font-style to set the style of the font, its two classic style is italic, that is, tilt, the following code:

{Font-style:italic;}

5. Here's a hodgepodge of the following:

First create a my.html that reads as follows:

Then create a my.css that reads as follows:

P {color: red; text-align: Center;     font-size: 13px; font-style: italic;}

Summary ***************

1. The main concern in this section is the typography of colors and fonts and the style of the fonts.

2. Here is a text class, it is used for typesetting, is a group of text arrangement.

3. Font is the format of each word, such as font, size, font tilt and so on.

2014 Sinsing Interpreting CSS Section III

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.