YogeshChauhan . com

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.

amazon

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 How to Use SQL MAX() Function with Dates? #6 PHP Login System using PDO Part 1: Create User Registration Page

Recently Posted

Jun 16 What are Stored Procedures for SQL Server? Jun 16 What are Class Constants in PHP? Jun 15 A short basic guide on states in React Jun 15 How to define constants in PHP? Jun 15 How to define visibility for a property in PHP? Jun 15 How to use @if and @else in SCSS?

You might also like these

Classes in JavaScript: The BasicsJavaScriptHow to create a secure random number using JavaScript?JavaScriptHow Routing works in Angular?AngularClearwater Seafoods – B2C in ChinaMiscA complete guide to add responsive YouTube videos using HTML and CSSCSSWordPress: How to get field values in Advanced Custom Fields?WordPressThe SQL UNION OperatorSQL/MySQLHow to create a simple tab interaction using CSS?CSSThe simple difference between var, let and const in JavascriptJavaScriptThe flex-grow, flex-shrink and flex-basis Properties in CSSCSSHow to create a pricing table using flex in CSS?CSSHow to make a Custom Login Page in WordPress?WordPress