CSS Properties Background

Source: Internet
Author: User

First, Background-size

1. The specific PX value, and the height of the north background image

2. Set the percentage, relative to the container's width and height

3. Set three types of laying:

(1) Cover: to the width/height as the basic, as far as possible to spread the entire container, overflow part of the cut off

(2) contain: to the width/height as the basic, as far as possible to fill the entire container, but the requirements can not overflow container

Second, background-repeat:repeat/no-repeat; If a picture does not fill the entire container, repeat the picture tile

Third, Background-position:

1, the specific two PX value, set the offset value relative to the upper left corner of the container

2, two percent values: calculated as (width of container-width of background picture) * Percentage, height analogy

3.left, right, top, bottom, respectively, equal to the first percent of 0%, 100%, the second percentage of 0%,100%

4.center, equivalent to 50% of the percentage

Note: background-position must write two values, not a single value in place of two identical values

  

CSS Properties 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.