CSS setting element background (to be continued)

Source: Internet
Author: User

The background background shorthand form is

Backgroud:background-color background-position background-size background-repeat background-origin background-clip Background-attachment Background-image

which

Background-color background Color

Background-position the position of the image is two values, string words, the first represents a vertical direction, the value includes Top.bottom.center. The second represents a horizontal direction, and the value includes Left.right.center. The number of units or percentages, the first represents the horizontal direction, such as 10px distance from the left edge of 10px, the second represents a vertical direction, such as 10%, the height distance from the upper boundary 10%, the top is 0. The bottom is 100%.

Background-size background size, four desirable values.

Number Unit Number unit The first is the width, the second is the height, if only one is set, and the other is auto. 20px 20px

Percent percent as above

Contain scale images,

CSS setting element background (to be continued)

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.