如何在CSS中制作一个带有箭杆的尖箭头?不仅仅是三角形,而是像从弓中射出的传统箭头一样?
我试图通过创建一个div容器来实现它,其中包含两个容器,左边和右边。右边将包含三角形,左边将包含三个div,其中心将被着色以创建箭杆。
以下是我的代码:
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;
}
有没有更简单的方法实现这个?