.triangle {
position: absolute;
&::after {
position: absolute;
top: 5px;
right: 0;
content: '';
width: 0;
height: 0;
border-left: 5px solid transparent;
border-right: 5px solid transparent;
border-top: 5px solid #fff;
}
}
<div class="triangle"></div>