Use of clip-path polygon
body { background-color: #000; } .fa { border: 1px solid #fff; color:yellowgreen; padding: 10px; margin: 10px; } .fa>div { width: 110px; height: 110px; background-color: yellowgreen; margin: 20px auto; } .polygon1 { clip-path: polygon(50% 0px, 100% 100%, 0px 100%) } .polygon2 { clip-path: polygon(0px 50%, 50% 0, 100% 50%, 50% 100%) } .polygon3 { clip-path: polygon(0% 60%, 20% 0%, 60% 0%, 40% 60%) } <div class="fa"> <p>polygon</p> <p>The value is composed of multiple coordinate points. The first value is in the x direction, and the second value is in the y direction. </p> <p>The upper left corner is the origin, and the lower right corner is the point (100%, 100%). </p> <div class="polygon1"></div> <div class="polygon2"></div> <div class="polygon3"></div> </div> circle
body { background-color: #000; } .fa { border: 1px solid #fff; color:yellowgreen; padding: 10px; margin: 10px; } .fa>div { width: 110px; height: 110px; background-color: yellowgreen; margin: 20px auto; } .circle1 { clip-path: circle(50% at 50% 50%) } .circle2 { clip-path: circle(70% at 50% 50%) } .circle3 { clip-path: circle(30% at 10% 10%) } <div class="fa"> <p>circle</p> <p>The value consists of a coordinate point and a radius. </p> <p>The upper left corner is the origin, and the lower right corner is the point (100%, 100%). </p> <p>When defining the radius, you can use the at keyword to define the coordinates. </p> <div class="circle1"></div> <div class="circle2"></div> <div class="circle3"></div> </div> ellipse
body { background-color: #000; } .fa { border: 1px solid #fff; color:yellowgreen; padding: 10px; margin: 10px; } .fa>div { width: 110px; height: 110px; background-color: yellowgreen; margin: 20px auto; } .ellipse1 { clip-path: ellipse(30% 20% at 50% 50%) } .ellipse2 { clip-path: ellipse(20% 30% at 50% 50%) } .ellipse3 { clip-path: ellipse(60% 10% at 10% 10%) } <div class="fa"> <p>ellipse</p> <p>The value consists of the x-axis radius of the ellipse, the y-axis radius, and the coordinates of the positioning ellipse. </p> <p>The upper left corner is the origin, and the lower right corner is the point (100%, 100%). </p> <p>The at keyword separates the radius from the coordinates</p> <div class="ellipse1"></div> <div class="ellipse2"></div> <div class="ellipse3"></div> </div> inset The value is (top right bottom left round top left radius top right radius bottom right radius bottom left radius) The value before round represents the distance. If the first value is 25%, it means that the image is drawn starting from 25% on the top. body { background-color: #000; } .fa { border: 1px solid #fff; color:yellowgreen; padding: 10px; margin: 10px; } .fa>div { width: 110px; height: 110px; background-color: yellowgreen; margin: 20px auto; } .inset1 { clip-path: inset(25% 0% 25% 0% round 0% 25% 0% 25%) } .inset2 { clip-path: inset(0% 25% 25% 0% round 25% 25% 25% 0%) } .inset3 { clip-path: inset(25% 25% 0% 0% round 0% 25% 0% 25%) } <div class="fa"> <p>inset</p> <p>The value is (top right bottom left round top left radius top right radius bottom right radius bottom left radius)</p> <p>The value before round indicates the distance. If the first value is 25%, it means that the image is drawn starting from 25% on the top</p> <div class="inset1"></div> <div class="inset2"></div> <div class="inset3"></div> </div> 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. |
<<: How to use cursor triggers in MySQL
>>: Master the commonly used HTML tags for quoting content in web pages
Whether the a tag opens a new page: (1) Baidu Ency...
MySQL installation instructions MySQL is a relati...
An optimization solution when a single MYSQL serv...
<br />Previous article: Web Design Tutorial ...
Flex layout is undoubtedly simple and easy to use...
MySQL backup Cold backup:停止服務進行備份,即停止數據庫的寫入Hot ba...
This article shares with you a detailed tutorial ...
1. Download VMware Workstation 64 version https:/...
Without further ado, I'll go straight to the ...
As a front-end monkey, whether it is during an in...
Preface At first, I wanted to use wget to downloa...
MySQL multi-condition query with AND keyword. In ...
Table of contents Preface Asynchronous loading Pa...
Preface During the development process, we often ...
Table of contents 1. Introduction to MySQL Index ...