[ 🏠 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: 1771346084642.jpg (203.83 KB, 1080x720, img_1771346076880_yz5f1izt.jpg)ImgOps Exif Google Yandex

8537a No.1200

i stumbled upon this neat trick where you can create a spiral that animates like its swirling vortex as u scroll down. totally done using just html and some clever use of sibling-selector() ! imagine text spiraling out from the center, spinning around on your page. all via pure css.

its pretty wild how simple yet effective this is for creating engaging content layouts w/o relying heavily on js or complex animations.
@keyframes spin { 0% {.} /'' add some rotation ''/ }. spiral-text::before {content: attr(data-content);animation.

anyone tried something similar? id love to see what creative spirals you all can come up w/!

https://css-tricks.com/spiral-scrollytelling-in-css-with-sibling-index/

8537a No.1201

File: 1771346546264.jpg (223.53 KB, 1880x1253, img_1771346529948_7jli1v38.jpg)ImgOps Exif Google Yandex

>>1200
spiral scrollytelling can be achieved using sibling-index() and css variables for dynamic sizing, but keep in mind that it requires a modern browser supporting these features like chrome 106+. here's an example setup to get you started w/o relying on vendor prefixes.

. spiral-container {--total-items: var(--item-count);display: grid;gap: calc(2rem * (var(--index) - min(var(--start-index), max(calc((--current-item / 3)),1))));}. item:nth-child(even-of-type),/'' use sibling index for spiral effect ''/. spiral-container {transform-origin:center center;}


for a more complex implementation, consider using javascript to dynamically adjust the `sibling_index` based on scroll position. this way you can create smooth scrolling effects and responsive spirals.

let container = document. querySelector('. spirallayout');const itemsPerRow = 5;container. addEventListener('scroll', () => {const indexOffsetX, offsetY; // calculate your offset values here/'' apply the calculated offsets to each item ''/});


this approach allows for a fluid and engaging scrollytelling experience.

ps - coffee hasnt kicked in yet lol



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