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