CSS Background-repeat Properties

Source: Internet
Author: User

The definition and usage of the Background-repeat property:
Sets or retrieves how the background image of an object is layout filled.
You must first specify the Background-image property.
2 parameters are allowed, if all 2 parameters are provided, the 1th is for landscape and the second is for portrait.
If only 1 parameters are supplied, it is used for both landscape and portrait. Special values Repeat-x and repeat-y are excluded, because repeat-x equals repeat no-repeat,repeat-y equivalent to no-repeat Repeat, that is, repeat-x and repeat-y are equivalent to providing 2 parameter values.
The corresponding script attribute is backgroundrepeat.
Syntax structure:

Background-repeat:repeat-x | repeat-y | [Repeat | space | round | no-repeat

Value:
Repeat: The background image is tiled horizontally and vertically, with default values.
Repeat-x: The background image is tiled horizontally.
Repeat-y: The background image is tiled vertically.
No-repeat: Uneven background image.
Round: The background image is automatically scaled until it fits and fills the entire container. (CSS3)
Space: The background image is tiled with the same spacing and fills the entire container or direction. (CSS3)
Browser support:
1.IE8 and earlier browsers do not support defining 2 parameter values for background-repeat; CSS3 new parameter values are not supported round | Space
2.firefox4.0-8.0 does not support defining 2 parameter values for background-repeat; CSS3 new parameter values are not supported round | Space
3.safari5.1 has accepted CSS3 new parameter value round | Space, but support has not yet been implemented. 4.chrome13.0-16.0 has accepted CSS3 new parameter value round | Space, but support has not yet been implemented.
Inheritance:
No inheritance.
Instance code:

<!DOCTYPE HTML><HTML><Head><MetaCharSet= "Utf-8"><Metaname= "Author"content= "http://www.softwhy.com/" /><title>Ant Tribe</title><styletype= "Text/css">. MyTest{Height:200px;Height:200px;Background-image:URL (mytest/div+css/border.jpg);background-repeat:Repeat-x;}</style></Head><Body><Divclass= "MyTest">Welcome to the Ant tribe.</Div></Body></HTML>

The original address is: CSS background-repeat Properties section.

More CSS articles can be found in http://www.softwhy.com/divcss/

CSS Background-repeat Properties

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.