css--Reading Notes-04

Source: Internet
Author: User

Fourth Chapter background Image effect

1. Basic

By default, the browser repeatedly displays the background image horizontally and vertically, allowing the image to be tiled across the page.

Body {    Background-image:url (/img/pattern.fig);}

You can choose horizontal, vertical, uneven: repeat-x, repeat-y, no-repeat

Body {    Background-image:url (/img/pattern.gif);    Background-repeat:repeat-x;}

You can set the back map position

Such as: The left side of the element, centered vertically. (can also be implemented using pixels and percentages)

h1 {    padding-left:30px;    Background-image:url (/imd/bullet.gif);    Background-repeat:no-repeat;    Background-position:left Center;}

Shorthand:

H1 {    background: #ccc URL (/img/ddd.gif) no-repeat left center;}

  

2. Round Corner Box

1 fixed-width rounded frame-rounded corners can be achieved by background image

Top a graph, bottom bottom a graph, the middle with the background color connection

Flexible, can be extended width, can be set 4 corners each picture, then the width of the EM units, can be stretched according to the font size.

2 "multi-background,Border-radius, Border-image

3. Projection

1 "Picture negative margin offset

2 "Image plus border and inner margin

3 "Box-shadow:

Requires 4 values: vertical and horizontal offset, projected width and color

4. Opacity:

opacity:0.8

Background-color:rgba (0,0,0,0.8)

css--Reading Notes-04

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.