Chapter 4 CSS of color background

Source: Internet
Author: User
Tags inheritance

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

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.