2
I want to create like a photo gallery, but here’s the thing, inside a <div>
there are several photos that, even if not of the same size, will be shown of the same size (and a smaller size so that all fit on the screen)!
By hovering over the images, they would increase to their actual size. I tried using the following code:
-webkit-transform: scale(1.3);
-ms-transform: scale(1.3);
transform: scale(1.3);
But the problem is that with this, the image is "blurred". I wanted the same effect (or similar effect), but without losing the image quality. Someone knows how I do it?
Did you crop the images? or just force them to be 1/3 of their size with CSS? I’ve never used
transform: scale()
, so I’m not sure, but if his behavior is to zoom in on the element the way it’s shown, you should look for an alternative way to get that effect.– mau humor
An idea, why don’t you do the opposite!? Leaves the image in the gallery with
transform: scale(0.7)
and in the:hover
putstransform: scale(1)
– hugocsl