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
Copy code The code is as follows: a:link { font-s...
For Linux system administrators, it is crucial to...
The solution to the problem that the PHP7.3 versi...
Table of contents 1. Basic Use 2. Working Princip...
Install Docker Update the yum package to the late...
Preface Since errors always occur, record the pro...
Preface In order to reflect the difference betwee...
Preface This article mainly introduces the releva...
Table of contents Project Directory Dockerfile Fi...
Long story short, today we will talk about using ...
Table of contents 1. Concept 2. Environmental Des...
Let's take a look at ufw (Uncomplicated Firew...
Table of contents Preface Project Design rear end...
Preface: Recently I am going to team up with my p...
The project needs to use MySQL. Since I had alway...