CSS (Cascading Style Sheets) Background attributes
Background-color)
This attribute sets the background color for HTML, which is equivalent to the bgcolor attribute in HTML.
Example:
......
....
Background-Image)
This attribute sets the background image for the HTML element, relative to the background attribute in the HTML
Http://www.baidu.com/img/baidu_logo_rw_0908_feps.gif) ">
Background-repeat)
This attribute is used together with the background-image attribute to determine whether the background image is repeated. If only the background-image attribute is set, the background-repeat attribute is not set. By default, the image is repeated horizontally and vertically.
Its property value
Repeat-x the background image is repeated horizontally.
Repeat-y vertical repetition of the background image
No-repeat background images are not repeated
Example:
Http://www.baidu.com/img/baidu_logo_rw_0908_feps.gif); background-repeat: No-repeat ">
Background-Attachment)
This attribute is used with the background-image attribute to determine whether the image is scrolling with the content or not. This attribute has two values: Scroll and fixed, the default value is scroll.
Example:
Body {background-image: URL (http://www.baidu.com/img/baidu_logo_rw_0908_feps.gif); background-repeat: No-Repeat; Background-Attachment: Fixed}
Background-Position)
This attribute is connected with the background-image attribute, which determines the initial position of the background image.
Body {background-image: URL (http://www.baidu.com/img/baidu_logo_rw_0908_feps.gif); background-reprat: No-Repeat; Background: 2 cm 3 cm} 2 CM is the initial position from the page to the left, 3CM is the initial position from the top of the page
Background)
This attribute is a quick and comprehensive method for setting related attributes, including baskground-color, background-image, background-repeat, background-attachment, and background-position.