Video wird geladen...
Video konnte nicht geladen werden
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

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 🤙

Arsyadvor 1 Jahr
silky tooltip @silkysignon

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

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?

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 🤙

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

Robin Stoytchevvor 1 Jahr
Codepen posted? Really nice 🙌

Private WIFIvor 1 Jahr
Wen book release

Brianvor 1 Jahr
Instead of Pinball Wizard, you're a CSS Wizard

Ayan Patelvor 1 Jahr
👏
