How to keep the document stream from moving when using transform:scale

clipboard.png

as shown in the figure above, use css to make a magnification effect when a mouse passes over a square, but as soon as you enlarge a square, the square next to it will be squeezed out or squeezed into the next row. Is there any way to fix the enlarged block and let it zoom in by itself so as not to affect other squares?

Feb.27,2021

can you send your code? I wrote a demo, in my own way without the problem you mentioned.
demo

Oh, I see. Your problem is not caused by scale, is it because you added border when you hover?

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1bdc03d-3000b.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1bdc03d-3000b.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?