Background of CSS | padding | Background image | Position

Source: Internet
Author: User

1. Boundary spacing: The distance between two elements of a border

You can specify top right and bottom left, if you write margin: A value that is the upper right bottom left margin is a value.

Example:

Tip: If you do not write margin, the default will be 0px, that is, no border spacing, is the original picture position

2. Fill attribute: The size of the space inside the border

Example:

3. Specify a background picture for any element

TIPS1: Find the URL of the image, right-click Property---address

4. Set the repeating mode of the background image:

The default is duplicate

Example:

5. Background attachment:

Example:

6. Background positioning (for background images):

Example:

100px from the top, 100px from the left:

Background of CSS | padding | Background image | Position

Related Article

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.