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