0

Usually they get animated when hovering over or clicking them but I want a button that stays animated all the time to draw the attention. For example a gradient runs through it every couple of seconds or it changes its colour slightly.

I guess it can only be done using CSS + JS, not CSS alone?

fiy. It's a PHP/HTML website

Temani Afif
  • 245,468
  • 26
  • 309
  • 415

1 Answers1

1

You can do it with css animations -webkit-animation: NAME-YOUR-ANIMATION 5s infinite; . So you can loop animation or end up your transition to stay where it has been ended animation-fill-mode: forwards;. Please read up here https://css-tricks.com/snippets/css/keyframe-animation-syntax/

Slobodan Gajić
  • 160
  • 1
  • 12