.gradation { animation: grad .10s linear infinite normal; } @keyframes grad{ 0%{ background:linear-gradient(90deg, blue 0%, pink) } 100%{ background:linear-gradient(90deg, blue 100%, pink) } }