amitmerchant1990 / amitmerchant-dot-com-comments

1 stars 0 forks source link

prevent-image-layout-shift-using-this-simple-css-hack/ #36

Open utterances-bot opened 2 years ago

utterances-bot commented 2 years ago

Prevent Image Layout Shift Using CSS – Amit Merchant – A blog on PHP, JavaScript, and more

When you are working with images on your website, the issue of the layout shift that comes with it is real and pretty annoying at times.

https://www.amitmerchant.com/prevent-image-layout-shift-using-this-simple-css-hack/

zakius commented 2 years ago

CSS techniques don't work too well when you have different image sizes though, of course you can inline the padding style, butthat's not perfect either