Advertisement
GIFCITY

zoom on hover

Jan 15th, 2024
571
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.26 KB | None | 0 0
  1. <style>
  2. #zoom {
  3. display: inline-block;
  4. overflow: hidden;
  5.  
  6. #zoom img {
  7. display: block;
  8. transition: transform .4s; /* smoother zoom */
  9. }
  10.  
  11. #zoom:hover img {
  12. transform: scale(1.3);
  13. transform-origin: 50% 50%;
  14. }
  15. </style>
  16.  
  17. <div id="zoom"><img src="URL"></div>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement