css| Syntax
1, color
function : Sets the color of the foreground or element.
numeric value: Use a color keyword or an RGB value.
Example :
Text color (keyword)
Text color (#rrggbb)
Text color [RGB (RR,GG,BB)]
Text color [RGB (r%,g%,b%)]
2, Background-color
features : Sets the background color of a page or page element.
value :
Colors-Available color names or RGB values
Transparent-transparent, making the page background the default background.
Example :
Background color
3, Background-image
function : Defines a background graphic.
value :
None-Background without graphics
URL-provides the URL address of the graphics file
Note : You can also include the Background-color property so that you cannot find a graphic age with
Example :
Graphics Background
4, Background-repeat
function : Controls whether the graphics background is repeated.
value :
Repeat-vertical and horizontal repeat, default value
Repeat-x-Horizontal Repeat
Repeat-y-Vertical Repeat
No-repeat-No repetition
Description : This property is used in conjunction with the Background-image and Background-position properties.
Example :
Horizontal repeat arrangement
5, Background-attachment
function : Specifies whether the background of the element is scrolled along with the element or fixed at a certain point in the page.
value :
Scroll-scrolling along with elements
Fixed-fix
Description :
The default value is scroll, which is used in conjunction with the Background-image property.
6, Background-position
features : used to position element backgrounds in space
value :
Length-the relative or absolute unit sets the starting point of the edge of the element box and gives the coordinates under the unit.
Percent-represents the position of the browser on the edge of the box at the beginning of the drawing. Can repeat this value also provides vertical and horizontal starting point
Vertical position-Sets the starting point of the vertical direction, the keyword is top, center, bottom
Horizontal position-Set the horizontal direction of the starting point, the key left, center, right
For example, the top left, and 0% 0% all indicate that the upper left-hand corner of the graphic begins at the upper-left corner of the element box
Example :
Body {background-image:url (logo.gif); background-position:50% 50%}
This statement sets the body base class to the background graphic to be centered on the page.
7, background
function : Shorthand property, you can set all background properties.
value :
Background-attachment
Background-color
Background-image
Background-position
Background-repeat
For details on the above values, see the Properties section.