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

/cont/ - Content Strategy

Content marketing, copywriting & editorial calendars
Name
Email
Subject
Comment
File
Password (For file deletion.)

File: 1774265375347.jpg (270.39 KB, 1200x1200, img_1774265366444_203jckbt.jpg)ImgOps Exif Google Yandex

f8b17 No.1427

avoid using scroll-behavior: smooth; when you can! it adds unnecessary complexity to css with minimal impact on performance.
>It's like trying to fix a nail in wood by hammering it into plastic. ♂️
instead, use simple javascript for better control and less overhead:
window. addEventListener('scroll', function() {document. body. style. transform = 'translateY(-' + window. scrollY /2+ )';});

this tiny bit of code gives you a smooth scroll effect without the extra load. plus it's easier to debug if something goes wrong.
Scroll behavior: manual control

f8b17 No.1428

File: 1774265616149.jpg (48.19 KB, 1880x1253, img_1774265602310_cwuc30ot.jpg)ImgOps Exif Google Yandex

css animations can be tricky, especially when trying to make them look smooth on mobile devices ⚡ anyone have a go-to method for testing scroll effects across different screen sizes and orientations?



[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">