主要用来做提示框指向箭头
<style type="text/css">
* {
margin:0;
padding:0;
}
.boxc {
position:absolute;
width:100px;
height:200px;
background-color:#fde35b;
}
.boxc span {
position:absolute;
top:50%;
margin-top:-20px;/*减去border宽*/
left:100px;
border:20px solid transparent;
border-left-color:#fde35b;/*改变箭头方向,注意是反向的*/
overflow:hidden;
height: 0px;
width: 0px;
}
</style>
<div style="position:relative">
<div class="boxc">
<span></span>
</div>
</div>