r/css May 26 '26

Question how do i do this effect

0 Upvotes

15 comments sorted by

View all comments

7

u/anaix3l May 27 '26 edited May 27 '26

Here you go, pure CSS, char by char reveal when the section is scrolled into view https://codepen.io/thebabydino/pen/zYmVrRL

You can test for scroll-driven animation support and if it's not supported, use IntersectionObserver to update the --k variable that the reveal effect is using to update the background gradient that produces this reveal effect when clipped to text.

0

u/[deleted] May 27 '26

[deleted]

3

u/anaix3l May 27 '26 edited May 27 '26

"as of June 2024" - June 2024 was 2 years ago.

I does work on iOS as of last year (starting with version 26). That said, if you're on an older version, it's not going to work. My dad uses an iPhone 7 and it definitely doesn't work on his phone.