This article mainly introduces the wonderful use of CSS transparent border background-clip, share it with everyone, and leave a note for yourself <div class="border"></div> .border { width: 300px; height: 300px; background: url("https://waiqin.oss-cn-shenzhen.aliyuncs.com/jxb-vip-ts/activitys/activitys15677540269589timg.jpg"); background-size: cover; margin-left: 100px; border: 10px solid rgba(255,255,255,.6); background-clip: padding-box; } background-clip: padding-box; key code The initial value of the background-clip property is border-box, which means that the background will be clipped by the element's border box (the outer edge of the border). If we don't want the background to invade the border, all we have to do is set its value to padding-box, so that the browser will use the outer edge of the inner margin to cut off the background. Effect Without background-clip: padding-box;, we can see that the background image is visible through the semi-transparent border. After adding it, the background is cut off at the border. The above is the full content of this article. I hope it will be helpful for everyone’s study. I also hope that everyone will support 123WORDPRESS.COM. |
<<: Development details of Vue3 components
>>: DHTML objects (common properties of various HTML objects)
Preface The this pointer in JS has always been a ...
1. Usage of instanceof instanceof operator is use...
Preface: I believe that those who need to underst...
I have also been researching MySQL performance op...
I installed MySQL smoothly in Ubuntu 16.04 before...
This article shares the specific code of vue+swip...
This article shares the specific code of jQuery t...
This article records the installation and configu...
When the Docker container exits, the file system ...
MySQL's MyISAM and InnoDB engines both use B+...
The main text starts below. 123WORDPRESS.COM Down...
Map tags must appear in pairs, i.e. <map> .....
Table of contents background explore Summarize ba...
Table of contents 1. Observable 2. Higher-order f...
First, you need to determine which fields or fiel...