CSS background color, background image, tiling, positioning, pinning

Source: Internet
Author: User

CSS Background color settings

background-color:red; Set the background color to red;

Background color settings support 3 ways of writing:

Color name

16 binary

Rgb

CSS Background Image color settings

Background-image:url (image address), such as setting a background image

The path is not in the description!

CSS background picture tiling settings (if you do not set the picture by default to the x-axis y-axis tile at the same time value is repeat)

Background-repeat:repeat-x, such as setting the x-axis tile;

Background-repeat:no-repeat If uneven paving is set;

CSS background image positioning settings

Background-position:right top;

CSS Background image fixed:

Label definition and usage instructions

Background-attachment sets whether the background image is fixed or scrolls along with the rest of the page.

Default value: Scroll
Inherited: No
Version: CSS1
JavaScript Syntax: object object.style.backgroundattachment= "fixed"
Property value
value Description
Scroll The background picture scrolls with the rest of the page. This is the default
Fixed The background image is fixed.
Inherit Specifies that the settings for background-attachment should inherit from the parent element

CSS background color, background image, tiling, positioning, pinning

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.