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 Solution to the error “Visual Studio Code can’t be opened because Apple cannot check it for malicious software” #2 How to add Read More Read Less Button using JavaScript? #3 How to check if radio button is checked or not using JavaScript? #4 Solution to “TypeError: ‘x’ is not iterable” in Angular 9 #5 How to uninstall Cocoapods from the Mac OS? #6 PHP Login System using PDO Part 1: Create User Registration Page

Recently Posted

#Apr 8 JSON.stringify() in JavaScript #Apr 7 Middleware in NextJS #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
You might also like these
Solution to “Call to undefined function mysql_error()” in RevSlider WordPress PluginWordPressHow to Secure Web or Mobile Browsers?MiscellaneousLIKE and ILIKE Operators in PostgresPostgresLearn how to add Scroll Indicator using CSS and JavaScript?CSSHow to add a Line Chart in Angular App?AngularHow to Make a Simple Module with a Form and Menu Link in Drupal 7.x?DrupalLEFT JOIN in PostgresPostgresSELF JOIN in PostgresPostgresFETCH clause in PostgreSQLPostgresThe Complete Basic Explanation of PHP SessionsPHPThe basics of @import rule in SCSS (Sass)SCSSHow to use @if and @else in SCSS?SCSS