Is there an easier method to create a pointy arrow in CSS that resembles a traditional arrow shot from a bow, complete with a stem?
I've been attempting to accomplish this by using multiple div containers - one for the triangle portion and another for the stem. The stem container includes three divs, with the middle one colored to represent the stem.
Below is my current code:
HTML:
<div id="main">
<div class='arrowblock'>
<div class='arrowright'></div>
<div class='rectcontainer'>
<div class='rect'></div>
<div class='rect' style='background-color:green'>
</div><div class='rect'>
</div>
</div>
CSS:
.rectcontainer {
height:30px;
width:100px;
}
.arrowblock {
width:130px;
border-top: 15px solid transparent;
}
.arrowright {
float:right;
border-top: 15px solid transparent;
border-bottom: 15px solid transparent;
border-left: 30px solid green;
}
.rect {
width:100px;
height:10px;
background-color:transparent;
}
Is there a more straightforward approach to achieve the desired arrow design?