CSS background common Property collation

Source: Internet
Author: User

To introduce a background image:

Background:image URL ("path")
Set the background size:

Background-size:auto Auto Size, default

Background-size:cover Keep the image size, scale, and tile the entire area, if the size is larger than the container will exceed

Background-size:contain Tile entire area, picture does not exceed container size (non-proportional scaling)

Background Tiling method:

Background-repeat:no-repeat not covered

Background-repeat:repeat-x Horizontal Orientation Tile

Background-repeat:repeat-y Vertical Tile

Background-repeat:repea default Full-spread

Background position:

background-position:20px 10px can take negative (opposite direction)

Background positioning:

Background-attachment:fixed

Background gradient (multiple colors can be made):

Background-image:linear-gradient (To Top,red,blue

CSS background common Property collation

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.