How to make the effect that an image magnifies to hover

Dean

New member
Apr 23, 2019
5
0
1
In this guide I will explain with HTML & CSS how to make the effect that the image enlarges to hover.
First we write the HTML structure with the image:
HTML:
<html>
<head>
<title>Titolo</title>
<meta charset="utf-8">
</head>
<body>
<img src="link img" class="classe">
</body>
</html>
Now in CSS (in the tag head through style sheet or through style) we insert:
CSS:
img.classe

{

width:auto;

}

img.classe:hover

{

width:XXpx;

height:XXpx;

}
Now, instead of width: XXpx we put a number of px higher than the image and equal to height.
I hope the guide was helpful to you
 
>

About us

  • OnForum.net is a resource community where aspiring webmasters and designers can share content and receive support for a wide variety of software platforms. We are working every day to make sure our community is one of the best.

Our community is hosted by

  • Găzduire Web - Namebox
  • Follow us