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