I created a triangle shape using CSS borders which I want to stay fixed at the bottom of viewport, and also I have a Bootstrap Glyphicon which I want to be centered inside that CSS triangle shape but I can't figure out how to do it.
Here's my code:
.to-top {
border-right: 60px solid transparent;
border-left: 60px solid transparent;
border-bottom: 60px solid black;
position: fixed;
bottom: 0;
left: 50%;
right: 50%;
transform: translateX(-50%);
}
.to-top span {
font-size: 2em;
transform: translateX(-50%);
}
<a href="#" class="to-top">
<span class="glyphicon glyphicon-chevron-up"></span>
</a>
Would you please help me on this.