基于Bilibili首页Banner视觉差效果实现的轻量级JavaScript组件库-提供Slide滑动和Transfer切换两...

基于Bilibili首页Banner视觉差效果实现的轻量级JavaScript组件库-提供Slide滑动和Transfer切换两...bz Parallax 基于 bilibili 首页 banner 实现的视觉差组件库 Installation You can install it via npm npm i bz parallax and then import it as follows import Banner from script js Example 1 Using effect Slide

大家好,我是讯享网,很高兴认识大家。这里提供最前沿的Ai技术和互联网信息。

# bz-Parallax

基于bilibili首页banner实现的视觉差组件库

Installation

You can install it via npm:

npm i bz-parallax 

and then import it as follows:

import Banner from '/script.js'; 

Example

1)Using effect: Slide

Giving the following HTML:

 
  
    
    

simply add the following JavaScript code:

new Banner('.Banner1',); 

Setting

Setting Type Default Hint
speed Number 3 need to be above 1 ( The higher the speed is set, the slower the images will move. )

2)Using effect: Transfer

Giving the following HTML:

 
  
    
    
...
...
...

simply add the following JavaScript code:

new Banner('.Banner1',); 

Setting

Setting Type Default Hint
speed Number 3 need to be above 1 ( The higher the speed is set, the faseter the images will transform. )
小讯
上一篇 2026-04-16 12:12
下一篇 2026-04-16 12:10

相关推荐

版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容,请联系我们,一经查实,本站将立刻删除。
如需转载请保留出处:https://51itzy.com/kjqy/262754.html