CSS animations let you smoothly transition property values over time. It adds life to your page. Itβs made up of:
This box uses moveBox
keyframes to move and swap colors over 3 seconds β forever.
animation
property.
@keyframes moveBox { 0% { transform: translateX(0); background-color: #03a9f4; } 50% { transform: translateX(200px); background-color: #e91e63; } 100% { transform: translateX(0); background-color: #03a9f4; } }
1. What does @keyframes
define?
2. What does animation: moveBox 3s ease-in-out infinite;
do?
3. What does infinite
mean in animations?