vue-sticky-position
vue sticky 定位组件 live demo
简介(Intro)
- 除了vue之外不依赖其他库,
- 最新版本仅支持vue2.0,使用vue1.0的请安装1.0的版本
- 如果浏览器支持 sticky 定位,则使用原生方式,不添加滚动监听
install
npm install vue-sticky-position
用法
sticky
components: Sticky
API
props
name | type | default | description |
---|---|---|---|
top | [Number, String] | 'auto' | 定位时距离顶部的距离,默认保持跟firefox的实现一致 |
z-ndex | Number | 10 | css中的z-index值 |