Is it possible to create a spinning triangle that rotates precisely from the center?
Check out this Codepen for an example
Here is the code snippet:
<div class="loader-wrapper">
<div class="loader"></div>
</div>
And here is the CSS code:
.loader-wrapper {
width: 100%;
height: 100vh;
background-color: #11e;
}
@keyframes load {
0% {
transform: rotate(0deg);
}
100% {
transform: rotate(360deg);
}
}
.loader {
position: absolute;
top: 0;
bottom: 0;
left: 0;
right: 0;
margin: auto;
width: 0;
height: 0;
border-style: solid;
border-width: 0 100px 173.2px 100px;
border-color: transparent transparent #007bff transparent;
animation: 4s linear 0s infinite load;
}