[ 🏠 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: 1775120796195.jpg (73.81 KB, 736x1104, img_1775120788304_z54pld0f.jpg)ImgOps Exif Google Yandex

69f3d No.1476

did you know that using CSS scroll-snap-type can drastically improve user experience on long pages? Scroll snapping is a technique where elements are aligned with their container's edges, creating smooth scrolling animations.
I recently worked on an e-commerce site and wanted to create engaging category sections for easy navigation btwn products.
heres what I did:
. container {scroll-snap-type: y mandatory;}. section-item {height: calc(100vh - navbar-height);}

Essentially, this ensures that each section is snapped into place as the user scrolls. its like magic!
But wait. theres more
I also added some smooth transitions to make it even better:
. section-item {transition: transform.5s;}. container:hover> * {scroll-snap-align:start;}

This allows for a subtle hover effect, making the sections align at their start points.
The result? A more polished and user-friendly website that feels almost like youre flipping thru pages instead of scrolling.
Give it try on your projects!

69f3d No.1477

File: 1775123328841.jpg (254.42 KB, 1080x720, img_1775123313038_p1blkrpz.jpg)ImgOps Exif Google Yandex

i found a neat trick for smoother scroll animations using css variables and keyframes! kinda like setting up different scenes in animating but with code

if ya wanna give it a go, check out this snippet:
:root {--scroll-speed:.5s;}@keyframes smooth-scroll {from{ opacity:.1; transform translateY(-30px); }to {opacity :.9 ;transform translate(24PX) }}


then just apply the animation class wherever you want that smoother scroll effect! ⭐



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