Introducing Background-clip to you

Source: Internet
Author: User

First, a background knowledge map.

Background-clip the clipping region used to determine the background, the following values are desirable:

1.border-box: This value is the default value, and the background is cropped from the border area, and the excess is cropped out. To see more clearly, I set the padding and border to 20px;

padding: 20px; borderdashed 20pxrgba(152,10,3,0.8); background-color: cornflowerblue;

Now write the background picture:

background-image: url("img/flower.PNG");

2.padding-box: The background is cropped out from the padding area, and the background over the padding area is clipped. and the background color and background image at the beginning and end of the same.

background-clippadding-box;

3. Context-box: The background is cropped from the content area, and the background of the content area will be cut off;

background-clip:content-box;

4, Text: Picture fill the font itself, from the situation I looked at the current only with the-webkit-prefix support this value. They are filled with a pair of paintings and chalk textures, respectively. We can also animate images, and so on, to create a variety of cool effects. The expression of words is powerless, poke links, see how others Play: Https://scotch.io/demos/background-clip-text-1 (three demo, the first has a hover effect. )







Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.

Introducing Background-clip to you

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.