使用html画一个五角星
<!DOCTYPE html>
<html>
<head>
<title>五角星</title>
<style>
.star {
position: relative;
display: inline-block;
width: 0px;
height: 0px;
border-right: 50px solid transparent;
border-bottom: 35px solid #f1c40f;
border-left: 50px solid transparent;
transform: rotate(35deg);
}
.star:after {
position: absolute;
content: "";
width: 0px;
height: 0px;
top: -28px;
left: -50px;
border-right: 50px solid transparent;
border-bottom: 35px solid #f1c40f;
border-left: 50px solid transparent;
transform: rotate(-70deg);
}
</style>
</head>
<body>
<div class="star"></div>
</body>
</html>
原文地址: https://www.cveoy.top/t/topic/8VS 著作权归作者所有。请勿转载和采集!