vue-sticky-position

2.0.0 • Public • Published

vue-sticky-position

vue sticky 定位组件 live demo

NPM version npm download

简介(Intro)

  • 除了vue之外不依赖其他库,
  • 最新版本仅支持vue2.0,使用vue1.0的请安装1.0的版本
  • 如果浏览器支持 sticky 定位,则使用原生方式,不添加滚动监听

install

vue-sticky-position

npm install vue-sticky-position

用法

    <sticky>
        <div class="stickyed">sticky</div>
    </sticky>
import Sticky from 'vue-sticky-position'
export default {
    components: {
        Sticky
    }
}

API

props

name type default description
top [Number, String] 'auto' 定位时距离顶部的距离,默认保持跟firefox的实现一致
z-ndex Number 10 css中的z-index值

Package Sidebar

Install

npm i vue-sticky-position

Weekly Downloads

10

Version

2.0.0

License

none

Last publish

Collaborators

  • shiye515