吸顶定位
滚动到某个位置后元素'粘'在视口边缘,常用于导航栏、工具条、目录。
实现提示词
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/