Use the CSS Transform scale Property to Scale an Element on Hover
Thetransformproperty has a variety of functions that let you scale, move, rotate, skew, etc., your elements. When used with pseudo-classes such as:hoverthat specify a certain state of an element, thetransformproperty can easily add interactivity to your elements.
Here's an example to scale the paragraph elements to 2.1 times their original size when a user hovers over them:
p:hover{transform:scale(2.1);}
Note:Applying a transform to adivelement will also affect any child elements contained in the div.
Add a CSS rule for thehoverstate of thedivand use thetransformproperty to scale thedivelement to 1.1 times its original size when a user hovers over it.