CSS Control background

Source: Internet
Author: User


CSS Control background


------------------CSS2-------------------------------------------------------

1.background:

2.background-color:

3.background-image:url (); The default background picture is displayed in the upper-left corner of the element

4.background-repeat:repeat\no-repeat\repeat-x\repeat-y;

5.background-position: transverse longitudinal; (value [percent/coordinate]/left,center,right)


6.background-attachment:scroll/fixed; How the background image is attached (background images are


Like content scrolling, scroll Default--roll, fixed---pinned to screen (viewable area))---compatibility issues


------------------CSS3-------------------------------------------------------


background-origin:border/padding/content (from which area to start showing the background)

------------> used to determine the reference position of the background-position calculation


background-clip: border-box/padding-box/content-box/no-clip=border-box;

(from which area to crop the background)

------------> Clipping area used to determine the background


background-size: length/precentage;


Multiple backgrounds: Multiple background images, you can just put different background images into one fast element. Use commas to close multiple picture URLs.

Example:

Background-image:url (img/multiple-backgrounds.png), url (img/multiple-backgrounds.png), url (img/mult Iple-backgrounds.png);

Background-position:left top, -320px bottom, -640px top;

Background-repeat:no-repeat, No-repeat, repeat-y;


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