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
  • 211,628
  • 17
  • 234
  • 311

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ć
  • 137
  • 1
  • 12