CSS + DIV for learning notes: CSS Images

Source: Internet
Author: User

CSS design thorough research section 5.2

1.Background Image

(1) set the background image:Background-image: none|Url (Url)

(2) image tiled orientation:Background-repeat: repeat|No-repeat|Repeat-x|Repeat-y

(3) image alignment:Background-position: (center | top | bottom |Length) | (Center | left | right |Length)(It can be set to one or two attribute values for horizontal and vertical positions, respectively .)

[Application]Make gradient background

1) Prepare a vertical gradient background image;

2) set the background color to the bottom row of pixels in the background image.

The Code is as follows:

Body {

Background-image: url(bg_grad.gif );

Background-repeat: repeat-x;

Background-color: # 39F;

}

Or abbreviated:

Body {

Background: # 39F url(bg_grad.gif) repeat-x;

}

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.