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 Solution to “TypeError: ‘x’ is not iterable” in Angular 9 #3 How to add Read More Read Less Button using JavaScript? #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

#Aug 15 Is PHP still good for back-end programming? #Aug 10 How to create a multisite network in WordPress? #Aug 3 How to create a circle that follows a cursor using JavaScript and CSS? #Aug 3 How to make a curtain slider using jQuery and CSS? #Aug 2 How to progressively load images and add a blurry placeholder? #Aug 1 How to create a placeholder loader (throbber) using CSS?
You might also like these
Configuring Modules with @forward rule in SCSS (Sass)SCSSHow to overwrite file contents with new content in PHP?PHPResponsive Masonry Grid using CSS columns PropertyCSSEverything you need to know about ANY, SOME and ALL Operators in PostgresPostgresWhat is a Strict Requirement in PHP 7 Function Declarations?PHPHow to get user’s Browser and Operating Systems information using PHP?PHPDoes :is() pseudo selector hint at CSS preprocessing in the future?CSSActions vs. Filters: hooks in WordPressWordPressThe Difference Between Arrays and Objects in JavaScriptJavaScriptAggregate Functions Examples in Postgres for BeginnersPostgresHow to create a for loop in SCSS (Sass)?SCSSSELF JOIN in PostgresPostgres