Advertisement
gyaruko

zoom + grayscale on hover

Feb 18th, 2022
1,359
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.83 KB | None | 0 0
  1. <style>
  2. .pp {
  3. overflow: hidden;
  4. margin: auto;
  5. min-width: 240px;
  6. max-width: 240px;
  7. width: 100%;
  8. border: 4px double #FFDBE7;
  9. border-radius: 10px;
  10. }
  11.  
  12. .pp img {
  13. transition: all 0.5s;
  14. box-sizing: border-box;
  15. max-width: 100%;
  16. }
  17.  
  18. .pp:hover img {
  19. transform: scale(1.3) rotate(12deg);
  20. webkit-filter: blur(1px); /* Chrome, Safari, Opera */
  21. filter: blur(1px);
  22.  
  23. display: inline-block;
  24.  
  25. width:100%;
  26. height:auto;
  27.  
  28. border: 3px double black;
  29. overflow: hidden; /* clip the excess when child gets bigger than parent */
  30. }
  31. .pp img {
  32. display: block;
  33. width:100%;
  34. height:auto;
  35. -webkit-filter: grayscale(0%);
  36.  
  37. }
  38.  
  39. .pp:hover img {
  40. -webkit-filter: grayscale(100%);
  41.  
  42. }
  43.  
  44. </style>
  45.  
  46. <figure class="pp">
  47. <img src="https://data.whicdn.com/images/359902270/original.gif">
  48. </figure> <!---you can cut this part off if you have pro plus!--->
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement