Пропустить навигацию
the little details™ Use trigonometric functions in CSS to create a smooth staggered transition delay…
0:00 / 0:35

the little details™ Use trigonometric functions in CSS to create a smooth staggered transition delay…

jhey ʕ•ᴥ•ʔ

@jh3yy148 тыс. подписчиков

Открыть в X
5 400 отметок «Нравится»СкачатьОригинальный пост

540 033 просмотра

the little details™ Use trigonometric functions in CSS to create a smooth staggered transition delay 🎬 .character { transition-delay: calc(sin((var(--index) / 12) * 45deg) * 0.475s); }

10 комментариев

Комментарии из оригинального поста в X (Twitter)

  • Фото профиля jhey ▲🐻🎈

    @jh3yy

    Here's the @CodePen link if you want to check it out! 🤙 Thrown together in some React for convenience 🤓 Should extract into a <CodeReveal/> component 💯🧱

    47 отметок «Нравится»

  • Фото профиля Charlotte 🦄🧚‍♀️

    @char_bone

    I'm going to just secretly put this into the app I'm working on and see if they notice 😄

    6 отметок «Нравится»

  • Фото профиля jhey ▲🐻🎈

    @jh3yy

    Put it in the footer, no one looks there 👀😅

    2 отметки «Нравится»

  • Фото профиля Gabe

    @gauelcom

    Yeah, how do you get the —index variable? Thats the true magic here i cannot fanthom… cuz normally that would all be part of a javascript loop

    6 отметок «Нравится»

  • Фото профиля jhey ▲🐻🎈

    @jh3yy

    Style it inline on the HTML <span class="digit" style="--index: 0;">1</span> <span class="digit" style="--index: 1;">9</span>

  • Фото профиля Charles Anim

    @charlesanim499

    Show us the code

    3 отметки «Нравится»

  • Фото профиля We Buy Once

    @webuyonce

    Amazing stuff!

    3 отметки «Нравится»

  • Фото профиля Roxana Muntian

    @roxanamuntian

    Those animations are so cool! At some point, it almost felt like the eye blinked. 😊 I might add this animation to the app that I am working on. It's the next level for CSS!

    3 отметки «Нравится»

  • Фото профиля SM Irving

    @metric_dev

    Very smooth! I wrote something similar in Sass as a function that lets you call a bunch of different CSS custom timing-functions from different keywords, Penner equations and Trig stuff. This makes me want to modify or write a separate function that returns calc equations instead

    3 отметки «Нравится»

  • Фото профиля Fonzy

    @0xFonzy

    goated animations

    2 отметки «Нравится»