This chapter is intended for use in C S
After introducing the declaration and application methods and some features in the previous chapter, we will officially introduce the CSS instructions from this chapter! This chapter has two main topics. The first part describes the color and background CSS, its main function is to set the foreground color, background color, background graphics, and other style settings of the element. The second part introduces the CSS command used to control the placement of the element.
C s finger order for face color back scenes
Color sets foreground color
Support: IE3, IE4, NC4
Applicable: all elements
Possible values:
<Color>
Set the color. For more information about the color usage instructions in Chapter 1, set the default value based on the browser.
Inheritance: Yes
General example: SPAN {color: BLUE}
Coaxial example: <SPAN style = "color: BLUE">
Background-color: set the background color
Support: IE4 and NC4
Applicable: all elements
Possible values:
<Color>
Set the color. For more information, see Chapter 1 about color usage.
Transparent
Transparent background of a parent element (color or pattern) default value: transparent
Inheritance: None
General example: BODY {background-color: BLUE}
Coaxial example: <BODY style = "background-color: BLUE">
Background-image: set the background image
Support: IE4 and NC4
Applicable: all elements
Possible values:
<Url>
Set the image URL. For more information, see Section 1 URL description.
None
Do not use the default value of the background pattern: transparent
Inheritance: None
General example:
BODY {background-image: URL ("http: // yourweb/path/file_name ")}
Coaxial example:
<BODY style = "background-image: URL ('http: // yourweb/path/file_name ')">
Background-repeat: set the background to be repeated.
Support: IE4 and NC4
Applicable: all elements
Possible values:
Repeat
Repeat the background image to fill the page
Repeat-x
Duplicate background image in horizontal direction
Repeat-y
Duplicate background image in vertical direction
No-repeat
The default value of the background image is repeat.
Inheritance: None
General example: BODY {background-repeat: repeat-x}
Coaxial example: <BODY style = "background-repeat: repeat-x">
Background-attachment
Support: IE4 and NC4
Applicable: all elements
Possible values:
Scroll
Scroll the background image
Fixed