Look at the code first, just copy and use, the following code can be copied and pasted to use (I will explain the code in the form of comments, you will see the following effects).
If you are satisfied, please give Mo Chengchen a Fabulous
< ! DOCTYPE html>
< html lang= "zh" >
< head>
< meta charset= "UTF-8" >
< meta name= "viewport" content= "width=device-width, initial-scale=1.0" >
< meta http- equiv= "X-UA-Compatible" content= "ie=edge" >
< title> < / title>
< style type= "text/css" >
. div1 {
width: 0 px;
height: 0 px;
border: 50 px solid;
border- color: transparent;
border- top- color: red;
}
. div2 {
width: 0 px;
height: 0 px;
border: 50 px solid;
border- color: transparent;
border- right- color: red;
}
. div3 {
width: 0 px;
height: 0 px;
border: 50 px solid;
border- color: transparent;
border- bottom- color: red;
}
. div4 {
width: 0 px;
height: 0 px;
border: 50 px solid;
border- color: transparent;
border- left- color: red;
}
< / style>
< / head>
< body>
< div class = "div1" > < / div>
< div class = "div2" > < / div>
< div class = "div3" > < / div>
< div class = "div4" > < / div>
< / body>
< / html>
Additional and useful information that may appear has been annotated