Css Hover Zoom In Code Example


Example 1: zoom image css


/*Zoom on hover*/

<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)*/
}
</style>

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

/*credits: w3schools.com */

Example 2: how to enlarge image when hover on in css


img:hover {
transform: scale(1.3);
}

Example 3: on hover zoom card


transform: scale(1.5);

Example 4: html zoom text on hover


<style>
#test-text:hover
{
font-size: 40px;
}


</style>

<body>
<p id=test-text>TEST</p>
</body>

Comments

Popular posts from this blog

Converting A String To Int In Groovy

"Cannot Create Cache Directory /home//.composer/cache/repo/https---packagist.org/, Or Directory Is Not Writable. Proceeding Without Cache"

Android SDK Location Should Not Contain Whitespace, As This Cause Problems With NDK Tools