[ Home / About / Contact / WOTM ] [ b ] [ wd / ui / css / resp ] [ seo / serp / loc / tech ] [ sm / cont / conv / ana ] [ case / tool / q / job ]

/wd/ - Web Design

Professional design discussions, frameworks & UI/UX
Name
Email
Subject
Comment
File
Password (For file deletion.)

File: 1792192144704.jpg (113.01 KB, 1024x1024, img_1792192137673_q5hlab18.jpg)ImgOps Exif Google Yandex

3e2b8 No.2336

i've been getting so tired of seeing layout shifts during page loads because the browser doesn't know how much space to reserve for an image before it actually downloads. using the aspect-ratio property on your img tags is such a simple fix for preventing that annoying jumping effect when users are trying to read.

img {width: 100%;height: auto;aspect-ratio: 16 / 9;}


it really helps the user stay focused on the content without the page jittering under their fingers as things pop in. does anyone else still rely on padding-bottom hacks for this?


[Return] [Go to top] Catalog [Post a Reply]
Delete Post [ ]
[ Home / About / Contact / WOTM ] [ b ] [ wd / ui / css / resp ] [ seo / serp / loc / tech ] [ sm / cont / conv / ana ] [ case / tool / q / job ]