CSS properties use clipping to create the displayable area of an element. The part inside the area is displayed, and the part outside the area is hidden. example div { width: 200px; height: 200px; background: #6c00af; -webkit-clip-path: polygon( 28% 6%, 71% 15%, 100% 75%, 18% 39%, 63% 27%, 16% 22%, 65% 19% ); clip-path: polygon( 28% 6%, 71% 15%, 100% 75%, 18% 39%, 63% 27%, 16% 22%, 65% 19% ); } Drawing cilp-path artifact bennettfeely.com/clippy/ grammar /* Keyword values */ clip-path: none; /* <clip-source> values */ clip-path: url(resources.svg#c1); /* <geometry-box> values */ clip-path: margin-box; clip-path: border-box; clip-path: padding-box; clip-path: content-box; clip-path: fill-box; clip-path: stroke-box; clip-path: view-box; /* <basic-shape> values */ clip-path: inset(100px 50px); clip-path: circle(50px at 0 100px); clip-path: polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%); clip-path: path('M0.5,1 C0.5,1,0,0.7,0,0.3 A0.25,0.25,1,1,1,0.5,0.3 A0.25,0.25,1,1,1,1,0.3 C1,0.7,0.5,1,0.5,1 Z'); /* Box and shape values combined */ clip-path: padding-box circle(50px at 0 100px); /* Global values */ clip-path: inherit; clip-path: initial; clip-path: unset; Value Use A shape whose size and position are defined by the <geometrybox> values. If no geometry box is specified, the bounding box will be used as the reference box. If declared together with Use Use Use Use Use the object bounding box as a reference box. Use the stroke bounding box as the reference box Use the nearest SVG viewport as the reference box. If a No clipping path is created. This is the end of this article about using CSS's clip-path property to display irregular graphics. For more information about CSS's clip-path irregular graphics, please search 123WORDPRESS.COM's previous articles or continue to browse the following related articles. I hope you will support 123WORDPRESS.COM in the future! |
<<: How does MySQL achieve multi-version concurrency?
>>: Docker compose deploys SpringBoot project to connect to MySQL and the pitfalls encountered
This article shares the specific code of js to im...
Nginx can generally be used for seven-layer load ...
Preface Before leaving get off work, the author r...
...It's like this, today I was going to make a...
Recently, when I was drawing an interface, I enco...
1. Background Generally, for Docker containers th...
These specifications are designed to allow for bac...
1. One-stop solution 1. Problem analysis and loca...
I believe that many partners who have just come i...
1 Introduction Redis is a high-performance NoSQL ...
Table of contents 1. Discover the problem 2. Dele...
Running Docker requires root privileges. To solve...
Learning Linux commands is the biggest obstacle f...
Click here to return to the 123WORDPRESS.COM HTML ...
Design the web page shown above: <!DOCTYPE htm...