ocean-book-light
v1.0.0
Published
the book light effect
Downloads
2
Readme
ocean-book-light
The command line app for ocean-book-light
Install
$ npm i ocean-book-light
Features
- the book light effect
- 初始化多个光效图片,产生轻微交叉旋转效果;
Usage
$ ocean-book-light
Usage:
.book {
position: absolute;
left: 65px;
top: 0;
z-index: 100;
}
.light1 {
position: absolute;
left: 795px;
top: -20px;
}
.light2 {
position: absolute;
left: 793px;
top: -38px;
}
<div class="wrap">
<img src="./img/book.png" class="book">
<img src="./img/light1.png" class="light1 light" alt="">
<img src="./img/light2.png" class="light2 light" alt="">
</div>
new BookLight({
target: '.light', // 随机生成2个类名:顺时针light-clockwise ,逆时针light-anticlockwise
deg: 5, // 旋转角度
time: 2000 // 动画时间,单位毫秒
});