<div id="star"></div>
#star {
width: 0;
height: 0;
border-top: 58px solid #f00;
border-left: 80px solid transparent;
border-right: 80px solid transparent;
position: relative;
margin: 100px;
}
#star::before {
content: "";
display: block;
width: 0;
height: 0;
border-top: 58px solid #0f0;
border-left: 80px solid transparent;
border-right: 80px solid transparent;
position: absolute;
top: -60px;
left: -77px;
transform: rotate(-72deg);
}
#star::after {
content: "";
display: block;
width: 0;
height: 0;
border-top: 58px solid #00f;
border-left: 80px solid transparent;
border-right: 80px solid transparent;
position: absolute;
top: -60px;
left: -83px;
transform: rotate(72deg);
}
This Pen doesn't use any external CSS resources.
This Pen doesn't use any external JavaScript resources.