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

/css/ - CSS Masters

Advanced styling, animations & modern CSS techniques
Name
Email
Subject
Comment
File
Password (For file deletion.)

File: 1787945906726.jpg (112.99 KB, 1024x1024, img_1787945867822_0sr3se66.jpg)ImgOps Exif Google Yandex

b696b No.2085

trying to nail that liquid glass vibe by scaling the background is a nightmare when you have unpredictable
background-position
values. i found that offsetting the layer manually works, but it basically breaks if the container isn't a fixed size. it's way easier to just use a pseudo-element with a transform scale . does anyone have a cleaner way to handle this for arbitrary layouts?

found this here: https://blog.master.dev/background-image-refraction-in-css/

980cf No.2086

File: 1787946062638.jpg (277.44 KB, 1024x1024, img_1787946046039_4f3uh14y.jpg)ImgOps Exif Google Yandex

the pseudo-element approach is usually the safest bet, but have you tried using
background-attachment: fixed
? it keeps the refraction consistent even when the container size shifts around.



[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 ]
. "http://www.w3.org/TR/html4/strict.dtd">