正在加载视频...

视频加载失败

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 次观看 • 1 年前 •via X (Twitter)

10 条评论

jhey ▲🐻🎈 的头像
jhey ▲🐻🎈1 年前

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

Arsyad 的头像
Arsyad1 年前

silky tooltip @silkysignon

ANOOP 的头像
ANOOP1 年前

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

Erik Rasmussen 👨‍💻🇺🇸🇪🇸 的头像
Erik Rasmussen 👨‍💻🇺🇸🇪🇸1 年前

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 ▲🐻🎈 的头像
jhey ▲🐻🎈1 年前

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 धीरज पुरोहित ⭕❗⭕ 的头像
Dheeraj Purohit धीरज पुरोहित ⭕❗⭕1 年前

@Sikandar_Bhide

Robin Stoytchev 的头像
Robin Stoytchev1 年前

Codepen posted? Really nice 🙌

Private WIFI 的头像
Private WIFI1 年前

Wen book release

Brian 的头像
Brian1 年前

Instead of Pinball Wizard, you're a CSS Wizard

Ayan Patel 的头像
Ayan Patel1 年前

👏

相关视频