Pure CSS Rollover


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



Copy this code and paste it in your HTML
  1. <style type="text/css">
  2. <!--
  3. #div {
  4. display: block;
  5. width: 151px;
  6. height: 30px;
  7. background-image: url("image-name.jpg");
  8. background-position: left top;
  9. background-repeat: no-repeat;
  10. }
  11.  
  12. #div:hover {
  13. background-position: left bottom;
  14. }
  15.  
  16. #div span {
  17. display: none;
  18. }
  19. -->
  20. </style>
  21.  
  22. <a id="div" href="#"><span>Description</span></a>

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.