Yogesh Chauhan's Blog

How to zoom an element on hover using CSS?

in CSS on March 2, 2021

Zoom is nothing but a larger view of the object.

We can use transform property of CSS and increase the object size.

The scale() method is helpful to make the object larger.

Let’s add the HTML first and start with a simple div element with a class name hover-zoom.

Let’s add some style to make the div visible.

Finally, add the hover style and make the div element bigger on hover.

Let’s add transition property to add a nice smooth animation.

Most Read

#1 How to check if radio button is checked or not using JavaScript? #2 How to add Read More Read Less Button using JavaScript? #3 Solution to “TypeError: ‘x’ is not iterable” in Angular 9 #4 How to uninstall Cocoapods from the Mac OS? #5 PHP Login System using PDO Part 1: Create User Registration Page #6 How to Use SQL MAX() Function with Dates?

Recently Posted

#Jan 17 4 advanced ways to search Colleague #Jan 16 Colleague UI Basics: The Search Area #Jan 16 Colleague UI Basics: The Context Area #Jan 16 Colleague UI Basics: Accessing the user interface #Jan 14 How to display a student’s individual transcript in Colleague? #Jan 11 How to install PuTTY on a MacOS?
You might also like these
How to use $INSERT command in Envision Basic?Envision BasicPHP arrays for US states’ full names and abbreviationsPHPLearn to Make a Simple Contact Us Form using PHP and PDO-MySQLPHPWhat is Conditional Rendering in React?ReactLearn how to add Scroll Indicator using CSS and JavaScript?CSSHow to list all PHP variables to debug the script?PHPControl rendering using CSS content-visibility propertyCSSHow to disable right click and drag and drop of images using jQuery?jQueryHow to make WordPress main stylesheet (style.css)?WordPressThe difference between Class declarations and Class expressions in JavaScriptJavaScriptHow to remove trailing characters from a string using JavaScript?JavaScriptHow to remove N/A from Radio Button list in Drupal?Drupal