指南 / 布局

吸顶定位

滚动到某个位置后元素'粘'在视口边缘,常用于导航栏、工具条、目录。

在线演示

吸顶导航

实现提示词

标准

Sticky navbar: pins to the top after scrolling past the first screen, with a shadow for separation.

含动效

Sticky navbar with smooth shadow fade-in on pin and a 200ms slide-down reveal; pins after the first screen.
设计规范条目
### Sticky Positioning (#sticky)

Category: Layout

Sticky: An element that 'sticks' to the viewport edge after scrolling to a position—commonly used for nav bars, toolbars, and tables of contents.

- Do: Sticky navbar: pins to the top after scrolling past the first screen, with a shadow for separation

With motion: Sticky navbar with smooth shadow fade-in on pin and a 200ms slide-down reveal; pins after the first screen.

Live demo: https://uidesignmd.com/guides/sticky/

规范包

从所选指南中导出实现规则和链接。

已选指南 0 / 20