You could go one step further and apply animations when the button has been pressed by using :focus.
:focus
.btn:focus { animation: 2s ease 0s infinite button-press; outline: 0; } @keyframes button-press { 0% { background-color: #0d7377; } 50% { background-color: #06393b; } 100% { background-color: #0d7377; } }
An infinite pulse is probably not good in practice though.
Thanks. Keyframes is my next topic to learn in css animation. Will implement this soon. Thanks for reading. 🙂
Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment's permalink.
Hide child comments as well
Confirm
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
You could go one step further and apply animations when the button has been pressed by using
:focus
.An infinite pulse is probably not good in practice though.
Thanks. Keyframes is my next topic to learn in css animation. Will implement this soon.
Thanks for reading. 🙂