Tuesday, September 3, 2013

How to make Star Shape with 6 points Using CSS

Here full css code to make star shape with 6 points using only css code.

#star-six {
width: 0;
height: 0;
border-left: 50px solid transparent;
border-right: 50px solid transparent;
border-bottom: 100px solid red;
position: relative;
}
#star-six:after {
width: 0;
height: 0;
border-left: 50px solid transparent;
border-right: 50px solid transparent;
border-top: 100px solid red;
position: absolute;
content: "";
top: 30px;
left: -50px;
}

Result:


How to make Star Shape with 6 points Using CSS

Disqus Comments