Posted By

ptrani on 06/29/11


Tagged

css CSS3


Versions (?)

CSS Link Background Transition


 / Published in: CSS
 

URL: http://www.paultrani.com

If you hover the mouse over the link the background color will smoothly change from light blue to dark blue and the font color – from black to white.

  1. a.foo {
  2. padding: 5px 10px;
  3. background: #69f;
  4. color: #000;
  5. -webkit-transition-property: background;
  6. -webkit-transition-duration: 0.5s;
  7. -webkit-transition-timing-function: ease;
  8. }
  9. a.foo:hover {
  10. background: #33f;
  11. color: #fff;
  12. }

Report this snippet  

You need to login to post a comment.