Css3.0 preemptive view (5): Background-origin and background-clip control background reality and cropping

Source: Internet
Author: User

Background-origin and background-clipAttributes are related to the reality of the background. Currently only supported in Mozilla, Safari 3, and Konqueror browsers.

Background-origin:Used to determine the display area of the background. It has three parameter values: border, padding, and content. Select border to display the background from the border area. For example, if you set the 10px dotted line border, you can see the background in the dotted line. If you select padding, the background is displayed from the padding area; similarly, if you select content, the background is displayed only in the content area.

Background-clip: Used to determine the cropping area of the background, or hidden area. It has two optional parameter values: Border and padding. Select border to crop the background from the border area. Select padding to crop the background from the padding area. Indeed, many of my friends may have had this experience. In order not to display the background in the padding area, they had to use a div or other method to replace the effect of padding. Now it's almost unnecessary. Many functions added in css3.0 are similar to making it easier for developers to change. If you are interested, you can go to the W3C website to learn the draft work, where the explanations are very detailed. If you are too reluctant to read it, read my blog. Haha ^_^

The background image is required. I will not demonstrate it here, and I will do it myself very quickly. Haha!

 

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.