移动端全屏滑动的小插件,简单,轻便,好用,只有3k swiper,myswiper,page,stage

mySwiper是一款专为移动端设计的轻量级全屏滑动插件,仅3KB大小。支持垂直和水平滑动方向,并提供丰富的配置选项。适用于各种移动网页应用。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

https://github.com/donglegend/mySwiper

 

mySwiper

移动端全屏滑动的小插件,简单,轻便,好用,只有3k

下载

  • 直接下载
  • bower install mySwiper

预览

预览demo

使用

支持amd和cmd规范

直接引入

<link rel="stylesheet" type="text/css" href="dist/swiper.css">
<script type="text/javascript" src="dist/swiper.js"></script>
<script type="text/javascript">
    var mySwiper = new Swiper(ops);
</script>

require.js 和 sea.js 引入

node环境引入

var Swiper = require("dist/swiper");
var mySwiper = new Swiper();

参数

stage: ".stage", //容器,默认类名  .stage
page: ".page", //单页面, 默认类名  .page
direction: "vertical", //方向 vertical(默认), horizontal
activeClass: "active", 
threshold: 50, // 翻页阈值,滑动的最小距离
duration: 300, // 页面过度 时间
elastic: 3 //弹性大小,值越大,滑动越不容易

转载于:https://www.cnblogs.com/donglegend/p/5367261.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值