Stuck.js
一个粘性库可以处理没有依赖关系的粘性堆栈(如jQuery)演示: :
快速开始
设置
您可以从下载:
$ npm i -S stuck-js
或。
代码
< style >
header {
height : 100 px ;
z-index : 100 ;
}
. ad {
width : 300 px ;
height : 250 px ;
}
</ style >
< body >
This is my first website
<!-- header contents -->
1