How TO - Zoom on Hover

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP





googletag.cmd.push(function() googletag.display('div-gpt-ad-1422003450156-2'); );



How TO - Zoom on Hover



❮ Previous
Next ❯


Learn how to zoom/scale an element on hover with CSS.




Zoom on Hover


Hover over the green box:






How To Zoom on Hover



Example



<style>
.zoom
    padding: 50px;
   
background-color: green;
    transition: transform .2s; /*
Animation */
    width: 200px;
    height:
200px;
    margin: 0 auto;


.zoom:hover
    transform:
scale(1.5); /* (150% zoom - Note: if the zoom is too large, it will go outside
of the viewport) */

</style>

<div class="zoom"></div>

Try it Yourself »


Tip: Go to our CSS Transform Tutorial to learn
more about how to scale elements.





❮ Previous
Next ❯

Popular posts from this blog

California

New York City

CNN