css 创建一个箭头

css 创建一个箭头_css
css 创建一个箭头_html_02

是通过控制四边的边框颜色来显示不同方向的箭头的。
关于 ​​​:after​​ 创建元素就不再冗述,百度之。

scss

.active{
position: relative;
&:after{
content: '';
position: absolute;
width: 0;
height: 0;
bottom: 0;
left: 50%;
margin-left: -10px;
border-width: 10px;
border-style: solid;
border-color: transparent transparent white transparent;
}
}
}