
Security News
Axios Maintainer Confirms Social Engineering Attack Behind npm Compromise
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.
carousel-plugin
Advanced tools
一个使用原生 JavaScript 实现的轮播图组件,兼容 pc 和 h5
![]() IE | ![]() Firefox | ![]() Chrome | ![]() Safari | ![]() iOS | ![]() Android |
|---|---|---|---|---|---|
| IE9+ | ✓ | ✓ | ✓ | ✓ | ✓ |
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
| option | description | default | val |
|---|---|---|---|
duration | 切换时长(ms)[可选] | 1000 | Number |
stay | 停留时长(ms)[可选] | 1000 | Number |
container | 外部容器[必选] | null | DOM |
wrap | 轮播容器[必选] | null | DOM |
multi | 一屏是否包含多个项目[可选] | false | Boolean |
dotsWrap | 底部锚点容器[可选] | null | DOM |
leftArrow | 左边切换按钮[可选] | null | DOM |
rightArrow | 右边切换按钮[可选] | null | DOM |
usePosition | 是否使用定位实现动画过渡[可选] | false | Boolean |
enableTouch | 是否允许触摸滑动[可选] | true | Boolean |
enableClick | 是否允许点击底部锚点切换[可选] | true | Boolean |
dotClassName | 锚点类名[可选] | dot | String |
activeClassName | 激活的锚点类名[可选] | active | String |
activeClassName | 激活的锚点类名[可选] | active | String |
欢迎给出一些意见和优化,期待你的 Pull Request
FAQs
A carousel,use transition or position,run in pc or mobile
The npm package carousel-plugin receives a total of 2 weekly downloads. As such, carousel-plugin popularity was classified as not popular.
We found that carousel-plugin demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

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.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.

Security News
The Axios compromise shows how time-dependent dependency resolution makes exposure harder to detect and contain.