79345655

Date: 2025-01-10 12:11:30
Score: 1
Natty:
Report link

A slightly better solution can be done using @property and css variables.

@property --rotate {
  syntax: '<angle>';
  initial-value: 0deg;
  inherits: false;
}
.gradient-button {
  animation: rotate-gradient 1s linear infinite;
  background-image: linear-gradient(var(--rotate), red, yellow, green);
}
@keyframes rotate-gradient {
  from {
    --rotate: 0deg;
  }
  to {
    --rotate: 360deg;
  }
}
<button id="fill" class="gradient-button">Fill Form</button>

Reasons:
  • Has code block (-0.5):
  • User mentioned (1): @property
  • Low reputation (0.5):
Posted by: Rob