Video wird geladen...
Video konnte nicht geladen werden
CSS Trick 📜 You can trigger text highlights on scroll with scroll-driven animations 😎 mark { animation: highlight; animation-timeline: view(); } @keyframes highlight { to { --lit: 1; }} mark span { background-position: calc(var(--lit) * -110%) 0; transition: background 1s; } The trick is using a scroll-driven animation to... show more
208,112 Aufrufe • vor 2 Jahren •via X (Twitter)
10 Kommentare

jhey ▲🐻🎈vor 2 Jahren
Here's that @CodePen link 🫶 Should be good in all browsers 🤙 No CSS scroll animation support? Falls back to Intersection observer ✨

Arif Sardarvor 2 Jahren
Indeed I like the way you toggle the theme much more than the highlight.

jhey ▲🐻🎈vor 2 Jahren
@Code_With_Arif Teaser for the next demo/video coming up 🫶😎

Ryanvor 2 Jahren
Codepen link?

tsúbomivor 2 Jahren
this makes reading easy for users.

Aryanvor 2 Jahren
This is some. crazy CSS love it

Madat Bayramovvor 2 Jahren
Really wish X to add possibility to have code snippet in the posts. Readability is a way too low in such posts

Andre Spechtvor 2 Jahren
Are scroll-driven events available on the main browsers?

An Vovor 2 Jahren
@HienHuuPham Amazing

edvor 2 Jahren
Would love to see a codepen link on this. Any chance you can share, please?
