<div class="box"></div>
.box{
width: 0;
height: 0;
border-left: 8px solid transparent;
border-right: 8px solid transparent;
border-bottom: 16px solid rgba(0, 3, 18, 1);
position: absolute;
right: -5%;
bottom: 19px;
transform: rotate(90deg);
}
非常的简单,直接引入js,如果这个三角的角度不是你要的,你可以修改 transform: rotate(90deg);里面的数值就可以得到任意位置的三角形了