jk's notes
  • Sticky 粘性布局

Sticky 粘性布局

文档: https://vant-contrib.gitee.io/vant/#/zh-CN/sticky

控制组件在页面滚动中吸顶或吸底等.

<van-sticky>
  <van-button type="primary">基础用法</van-button>
</van-sticky>
  • offset-top 和 offset-bottom 用于定义吸附距离.
  • 默认全局吸附, 如果要指定容器, 可以使用 :container="ref容器" 来配置只在某个容器内部吸附.
Last Updated:
Contributors: jk