CSS text font color (CSS color)

Source: Internet
Author: User
Tags border color

CSS text font color (CSS color)

CSS Color Style article

Catalogue (Music relaxation chair)

recognize CSS colors (color)
Web Page Color Basics
Two ways to set the object color style
Text color Controls Color
Web page background color
Border Colors Color
Web color RGB Settings
Web Color Table
CSS Color Styling Color Summary

I. Understanding CSS colors (CSS color)-TOP (Music relaxation chair)

Here is to introduce the page settings color contains what, page color specification.
1. Common color places include: Font color, hyperlink color, page background color, border color
2, color specification and Color rules: Web page using RGB mode color
Second, the color of the basic knowledge-TOP

The use of colors in Web pages is an essential element of a webpage. The purpose of the use of color is to have a different, dynamic (especially in the use of hyperlinks), aesthetics, and color is also a variety of web page style representation of one of the elements, understand CSS font color. (Music relaxation Chair)

Traditional HTML color vs. css color comparison and div CSS application color

CSS Color Syntax:

Color: #000000;

RGB color VALUES (#FFFFFF, #000000, #F00) are directly added to the CSS style after color
RGB color values are determined at the actual layout and can be obtained using the Photoshop (PS) pickup tool.
Three, two ways to set the object color style-TOP

1. Use color color style within div tag
<div style= "color: #F00" >www.divcss5.com</div>

2. Use the color style CSS code in the CSS selector:
. Divcss5{color: #00F}
/* Set object DIVCSS5 text in blue */(Music relaxation chair)

Extended reading: Here, CSS annotations are used to describe this style setting, and to understand CSS annotations: http://www.divcss5.com/rumen/r32.shtml

3, Div+css color style complete case:
CSS code:

. Divcss5{color: #00F}
/* Set object DIVCSS5 inside text is blue */


HTML code:

<p>
Use the color CSS style in the tag <br/>
<div style= "color: #F00" >www.divcss5.com Red </div>
</p>
<p> external style Sheet set object color color <br/>
<div class= "DIVCSS5" >www.divcss5.com Blue </div>
</p>

4. Example structure diagram:

div CSS Color style use case
Use the color color style and CSS code in the label above using color style.
Four, the text color control the same-TOP

Traditional HTML and CSS text colors are the same using "color:" + "RGB color value", such as the color for the black word that corresponds to the Set CSS property selector add "color: #000;" Can.
Five, the background color settings of the page difference-TOP

The traditional setting background color uses "bgcolor= color value", while the CSS "background:" + color value. For example: Set the background to black, traditional HTML settings, that is, add "bgcolor=" #000 "" in the tag to achieve a black background, if in the corresponding CSS selector is always "background: #000" implementation.
Six, set the border color difference-TOP

Traditional "bordercolor= value", CSS "Border-color:" + color value. For example: in traditional HTML directly in the table tag to add "bordercolor=" #000 "", in the CSS now set "Border-color: #000;" You can make the border color black, while remembering to include setting the width and style (dashed, implemented).

Div+css color value Extension knowledge:
The color value is a keyword or an RGB specification for a number.

16 keywords are taken from the Windows VGA palette: Aqua, Black, blue, fuchsia, grey, green, grey, maroon, navy, olive, purple, red, silver, cyan, white, yellow.
Seven, RGB color gives one of four methods-TOP

1, #rrggbb (e.g., #00cc00) (it is strongly recommended to use this to indicate a color value)
2. #的RGB (e.g., #0c0)
3, RGB (10, x,x) x is an inclusive integer between 0 and 255 (such as RGB (0,204,0))
4, RGB (ÿ%,ÿ%,ÿ%), where Y is an inclusive number between 0.0 and 100.0 (such as RGB (0%,80%,0%))
Eight, the following is the RGB color table-TOP

CSS color table, div CSS color RGB color table

Of course, the general web development software has a color accessor:

RGB Color Picker
CSS Color picker in web development software DW Software

How do I get CSS color values?

We can't remember the color values, and how to determine exactly the same color values as the artwork? It's very simple. Usually we get accurate color values by using the Color Picker tool in PS software, and we can also use other specialized color tools to get the exact color value.
Ix. div CSS Color Style summary-TOP

Using CSS styles to set the object content color style, we can use the named CSS Class object to set its color style, as well as set the color style directly within the HTML tag. Above, we also introduce and practice these 2 kinds of text content set color method.

CSS text font color (CSS color)

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.