0.0.3 • Published 8 years ago

v-sticky v0.0.3

Weekly downloads
2
License
MIT
Repository
-
Last release
8 years ago

v-sticky

Usage

Vue.use(vSticky);
<div class="my-class" v-sticky></div>
.my-class {
  width: 100%;
  height: 100px;
  position: -webkit-sticky;
  z-index: 999;
  top: 0;
}

v-sticky 在支持 position: -webkit-sticky 的浏览器上将使用原生的 CSS 方式,在不支持该属性的浏览器上使用 position: fixed 进行模拟。目前,v-sticky 仅能识别 top 的值。

CDN

//github.elemecdn.com/uglifyjs!banricho/v-sticky/0.0.2/v-sticky.js