Simple button fade transition


/ Published in: CSS
Save to your folder(s)

On hover the button will have a smooth transition to the hover colour, then fade out on mouse out.


Copy this code and paste it in your HTML
  1. a {
  2. color: red;
  3. background-color: green;
  4. -webkit-transition: background-color 0.2s linear;
  5. -moz-transition: background-color 0.2s linear;
  6. transition: background-color 0.2s linear;
  7. }
  8. a:hover {
  9. background-color: blue;
  10. }

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.