CSS3 Background background

Source: Internet
Author: User

CSS3 background <background>

CSS3 contains a number of new background properties that provide more powerful control over the background. You can customize the size of the background map to define the location of the background image, CSS3 also allows us to use multiple background images for the element

Property

Describe

Css

Background-image

Background map of the specified background

2

Background-position

Positioning of the specified background

2

Background-repeat

A repeating pattern of the specified background

2

Background-color

Color of the specified background

2

Background-clip

Drawing area with specified background

3

Background-origin

Specify the location area of the background image

3

Background-size

Specify the size of the background image

3

Background-size

Value

Describe

Length

Sets the height and width of the background image. The first one is the width, the second is the height, and the default value is auto;

Percentage

Sets the width and height of the background image with the percent hundred of the parent element. The first value sets the width, and the second value sets the height. If the value is set to a value, the second one is defaulted to auto

Cover

Expand the background image to be large enough to allow the background image to completely cover the background area. Some parts of the background image may not appear in the background positioning area.

Contain

Extend the image to the maximum size so that its width and height are fully adapted to the content area



Background-origin

Value

Describe

Padding-box

Background image is positioned relative to the inner margin

Border-box

The background image is positioned relative to the bounding box.

Content-box

Background image is positioned relative to the content box

CSS3 Background Background

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.