New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

carousel-plugin

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

carousel-plugin

A carousel,use transition or position,run in pc or mobile

latest
Source
npmnpm
Version
1.0.2
Version published
Weekly downloads
2
Maintainers
1
Weekly downloads
 
Created
Source

一个使用原生 JavaScript 实现的轮播图组件,兼容 pc 和 h5

内容

浏览器兼容性

IE
IE
Firefox
Firefox
Chrome
Chrome
Safari
Safari
iOS Safari
iOS
Chrome for Android
Android
IE9+

功能特性

  • 使用原生 JavaScript
  • 兼容 pc 和 h5
  • 持续维护迭代

安装

npm install carousel-plugin --save

OR

<script src="./dist/carousel.min.js"></script>
<script>
	new Carousel({
		container: document.querySelector('.carousel'),
		wrap: document.querySelector('.wrap')
	});
</script>

使用

开发

npm run dev

编译案例

npm run build:example

编译生产环境

npm run build:prod

案例

请查看example

pc oline demo

mobile oline demo

config

optiondescriptiondefaultval
duration切换时长(ms)[可选]1000Number
stay停留时长(ms)[可选]1000Number
container外部容器[必选]nullDOM
wrap轮播容器[必选]nullDOM
multi一屏是否包含多个项目[可选]falseBoolean
dotsWrap底部锚点容器[可选]nullDOM
leftArrow左边切换按钮[可选]nullDOM
rightArrow右边切换按钮[可选]nullDOM
usePosition是否使用定位实现动画过渡[可选]falseBoolean
enableTouch是否允许触摸滑动[可选]trueBoolean
enableClick是否允许点击底部锚点切换[可选]trueBoolean
dotClassName锚点类名[可选]dotString
activeClassName激活的锚点类名[可选]activeString
activeClassName激活的锚点类名[可选]activeString

贡献

欢迎给出一些意见和优化,期待你的 Pull Request

Keywords

carousel

FAQs

Package last updated on 07 Sep 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts