Advertisement
okesan

fading images

Jun 17th, 2013
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.34 KB | None | 0 0
  1. HOW TO: Fading images
  2. It’s popular for tumblr themes to have a fading effect when you hover over image posts. You can change just how much they fade by replacing the 0.6 with another number.0.6 means that the image is at 60% of its opacity. If you want a lesser fade, try 0.8 or 0.75. Play around with that to get it right to your standards.
  3.  
  4. Paste the following code beneath <style type=”text/css”>
  5. This code makes your images transparent when you hover over them:
  6.  
  7. img{
  8. opacity: 1.0;
  9. -webkit-transition: all 0.3s linear 0s;
  10. -moz-transition: all 0.3s linear 0s;
  11. -o-transition: all 0.3s linear 0s;
  12. transition: all 0.3s linear 0s;}
  13.  
  14. img:hover{opacity: 0.6;
  15. -webkit-transition: all 0.3s linear 0s;
  16. -moz-transition: all 0.3s linear 0s;
  17. -o-transition: all 0.3s linear 0s;
  18. transition: all 0.3s linear 0s;}
  19. And paste the following code above </style>
  20. makes your images transparent, and then solid when you hover:
  21.  
  22. img{opacity: 0.6;
  23.  
  24. -webkit-transition: all 0.3s linear 0s;
  25.  
  26. -moz-transition: all 0.3s linear 0s;
  27.  
  28. -o-transition: all 0.3s linear 0s;
  29.  
  30. transition: all 0.3s linear 0s;}
  31.  
  32. img:hover{opacity: 1.0;
  33.  
  34. -webkit-transition: all 0.3s linear 0s;
  35.  
  36. -moz-transition: all 0.3s linear 0s;
  37.  
  38. -o-transition: all 0.3s linear 0s;
  39.  
  40. transition: all 0.3s linear 0s;}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement