Video wird geladen...

Video konnte nicht geladen werden

Zur Startseite

sliding hover tip effect with CSS :has() and anchor positioning ✨ :root:has(li:nth-of-type(3):hover) { --i: 3; } .track { translate: 0 calc(var(--i) * -1lh); nav { anchor-name: --nav; } .tip { position-anchor: --nav; left: calc(anchor(right) + 1rem); }

164,666 Aufrufe • vor 1 Jahr •via X (Twitter)

10 Kommentare

Profilbild von jhey ▲🐻🎈
jhey ▲🐻🎈vor 1 Jahr

here's the @CodePen for this one 🚀 updated it so you can explicitly define the flow of how the text slides 🤙

Profilbild von Arsyad
Arsyadvor 1 Jahr

silky tooltip @silkysignon

Profilbild von ANOOP
ANOOPvor 1 Jahr

Looks cool For the the Horizontal menu the text moving sideways would have looked super cool

Profilbild von Erik Rasmussen 👨‍💻🇺🇸🇪🇸
Erik Rasmussen 👨‍💻🇺🇸🇪🇸vor 1 Jahr

I assume this is okay for a11y, because "tooltips as divs" are ignored by screen readers, and the information is portrayed through other means?

Profilbild von jhey ▲🐻🎈
jhey ▲🐻🎈vor 1 Jahr

Yeah, for that reason [aria-hidden] on the tip itself and readable navigation links with a class to visually hide them but not from screen readers 🤙

Profilbild von Dheeraj Purohit धीरज पुरोहित ⭕❗⭕
Dheeraj Purohit धीरज पुरोहित ⭕❗⭕vor 1 Jahr

@Sikandar_Bhide

Profilbild von Robin Stoytchev
Robin Stoytchevvor 1 Jahr

Codepen posted? Really nice 🙌

Profilbild von Private WIFI
Private WIFIvor 1 Jahr

Wen book release

Profilbild von Brian
Brianvor 1 Jahr

Instead of Pinball Wizard, you're a CSS Wizard

Profilbild von Ayan Patel
Ayan Patelvor 1 Jahr

👏

Ähnliche Videos