<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<style>
*{
margin: 10px auto;
}
.box1 {
width: 0;
height: 0;
border-top: 50px solid blue;
border-right: 50px solid orangered;
border-bottom: 50px solid gray;
border-left: 50px solid peachpuff;
}
.box2 {
width: 50px;
height: 50px;
border-top: 25px solid blue;
border-right: 25px solid orangered;
border-bottom: 25px solid gray;
border-left: 25px solid peachpuff;
}
.box3 {
width: 0;
height: 0;
border-top: 100px solid transparent;
border-right: 100px solid orangered;
border-bottom: 0px solid gray;
border-left: 0px solid peachpuff;
}
p {
text-align:center;
}
</style>
</head>
<body>
<div class="box1"></div>
<div class="box2"></div>
<div class="box3"></div>
</body>
</html>
使用css实现三角形
最新推荐文章于 2023-09-05 16:23:33 发布