In this tutorial we will show you how to Zoom In And Zoom Out Images On Hover Using CSS3. You may also like Rotate And Flip Images Using CSS3
CHECK OUT THIS TUTORIAL LIVE DEMO →
To Zoom In Image it takes only one step:-
- Make a HTML file and define markup and styling
Step 1. Make a HTML file and define markup and styling
We make a HTML file and save it with a name zoomin.html
<html> <head> <style> body { margin:0 auto; padding:0; text-align:center; height:2000px; background-color:#0B2161; } #wrapper { width:995px; padding:0px; margin:0px auto; font-family:helvetica; text-align:center; } h1 { text-align:center; font-size:35px; margin-top:60px; color:#A9BCF5; } h1 p { text-align:center; margin:0px; font-size:18px; text-decoration:underline; color:grey; } .item { border: 1px solid silver; overflow: hidden; -moz-box-sizing: border-box; -webkit-box-sizing: border-box; box-sizing: border-box; padding: 0; width:250px; height:220px; margin-left:370px; } .item img { max-width: 100%; -moz-transition: all 0.3s; -webkit-transition: all 0.3s; transition: all 0.3s; width:250px; height:220px; } .item:hover img { -moz-transform: scale(1.3); -webkit-transform: scale(1.3); transform: scale(1.3); } </style> </head> <body> <div id="wrapper"> <div class="item"> <img src="images/product3.jpg" alt="Demo Zoom In Image On Hover"> </div> </div> </body> </html>
In this step we simply use CSS3 transform property to zoom in the image and we also use CSS3 transition to make zoom in smoother. You may also like Blur And Change Image Color Using CSS3
Thats all, this is how to Zoom In and Out Image On Hover. You can customize this code further as per your requirement. And please feel free to give comments on this tutorial.
Latest Tutorials
- Create Animated Skill Bar Using jQuery, HTML And CSS
- Simple And Best Responsive Web Design Using CSS Part 2
- Show Button On Hover Using HTML And CSS
- Material Design Login Form Using jQuery And CSS
- Animated Progress Bar Using jQuery And CSS
- Dynamic Drop Down Menu Using jQuery, Ajax, PHP And MySQL
- Get Website Statistics Using PHP, jQuery And MySQL
- HTML5 Login And Signup Form With Animation Using jQuery
- Facebook Style Homepage Design Using HTML And CSS
- View Webpage In Fullscreen Using jQuery