Pure CSS star shape [duplicate]
This question already has an answer here: How do CSS triangles work? 17 answers There are a lot of CSS shapes shown on CSS Tricks . I am particularly surprised by the star: How does the CSS below create this shape? #star-five { margin: 50px 0; position: relative; display: block; color: red; width: 0px; height: 0px; border-right: 100px solid transparent; border-bottom: 70px solid red; border-left: 100px solid transparent; transform: rotate(35deg); } #star-five:before { border-bottom: 80px solid red; border-left: 30px solid transparent; border-right: 30px solid transparent; position: absolute;