Day # 58: Triangle loader
Since animations are a great resource to practice CSS fundamentals, I decided to create another loading animation for today’s website.
This project basically consists of a couple of triangles that rotate while joining at the same time. The key here is to start by creating those two triangles, and then the animation is basically continuous rotations of 90 deg:
@keyframes rotateA {
0%, 25% {
transform: rotate(0deg)
}
50%, 75% {
transform: rotate(180deg)
}
100% {
transform: rotate(360deg)
}
}
You need to have the intervals right in order to make sense, so the trick here is to test several combinations until you get the desired one.
Comments
Post a Comment