How do I add a red border outside this 8 point star? Or is there a simple svg solution anyone knows of?
IS: NEED:
JS fiddle
HTML
<div id="star8"></div>
CSS
#star8 {
border: 3px solid red;
background: blue; width: 80px;
height: 80px;
position: relative;
-webkit-transform: rotate(20deg);
-moz-transform: rotate(20deg);
-ms-transform: rotate(20deg);
-o-transform: rotate(20eg);
}
#star8:before {
content: "";
position: absolute;
top: 0;
left: 0;
height: 80px;
width: 80px;
background: blue;
-webkit-transform: rotate(135deg);
-moz-transform: rotate(135deg);
-ms-transform: rotate(135deg);
-o-transform: rotate(135deg);
}
This can be created with a single svg path. Adding outline can be done with adding a stroke property to the path
<svg viewBox="-1 -1 50 50" width="200px">
<path d="M 35,40 30,48 21,42 11,44 9,34 0,30 6,20 4,10 14,8 20,0 28,5 38,3 l 1,10 8,5 -5,8 2,10z" stroke="red" stroke-linejoin="bevel" fill="black" />
</svg>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With