Simply use clip-path to create the triangle:
.triangle {
width: 100px;
height:86.6px; /* 0.866 * Width in order to have an equilateral triangle [0.866 = (sqrt(3)/2)] */
background-image: linear-gradient(to bottom right, black, blue);
clip-path:polygon(50% 0,100% 100%, 0 100%);
}
<div class="triangle"></div>