0% found this document useful (0 votes)
17 views

Background Background-Attachment Background-Color Background-Image Background-Position Background-Repeat

The document discusses the CSS background-repeat property. It defines background-repeat as the property that sets if and how a background image will be repeated. By default, a background image will repeat both vertically and horizontally. The background-repeat property is supported in all major browsers. The values of background-repeat include repeat, repeat-x, repeat-y, and no-repeat.

Uploaded by

rendermanuser
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
17 views

Background Background-Attachment Background-Color Background-Image Background-Position Background-Repeat

The document discusses the CSS background-repeat property. It defines background-repeat as the property that sets if and how a background image will be repeated. By default, a background image will repeat both vertically and horizontally. The background-repeat property is supported in all major browsers. The values of background-repeat include repeat, repeat-x, repeat-y, and no-repeat.

Uploaded by

rendermanuser
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

CSS Backgrounds and Images CSS background-repeat Property body { background-image:url('pattern.

gif'); background-repeat:repeat-y; } Definition and Usage The background-repeat property sets if/how a background image will be repeated. By default, a background-image is repeated both vertically and horizontally. Browser Support

The background-repeat property is supported in all major browsers. Note: The value "inherit" is not supported in IE7 and earlier. IE8 requires a !DOCTYPE. IE9 supports "inherit". Tips and Notes Tip: The background image is placed according to the background-position property. If no background-position is specified, the image is always placed at the elements top left corner. Value repeat repeat-x repeat-y no-repeat inherit Description The background image will be repeated both vertically and horizontally. This is default The background image will be repeated only horizontally The background image will be repeated only vertically The background- image will not be repeated Specifies that the setting of the background-repeat property should be inherited from the parent element

All CSS Background Properties

background background-color background-image background-repeat


Fixed background image <style type="text/css"> body {

Sets all the background properties in one declaration Sets whether a background image is fixed or scrolls with the rest of the page

background-attachment

Sets the background color of an element Sets the background image for an element Sets the starting position of a background image

background-position

Sets how a background image will be repeated

background-image:url('pattern.gif'); background-repeat:no-repeat; background-attachment:fixed; } </style>

You might also like