CSS transform (scale) vs. zoom

4 days ago 9
ARTICLE AD BOX

I use

<div class="flex"><div class="box"><img...>br>ab</div><div class="box"><img><br>cd<br>ef</div>..</div>

and I want to zoom the box to 50%. This works just fine if I use zoom:50% on the box. But according to the ai I should not use this (browser-compatibility, standard).

So I should use transform: scale(50%) intead. It scales fine, but the space the box used originally is still used. With a wrapper class I can change the width (with 200% width scaled, and overflow hidden) but since I don't know the height the same doesnt work with the height and 50 % of the box with original hight is white.

Does anyone know a solution to this or can I actually use zoom?

Read Entire Article