# seamless-scroll **Repository Path**: dataup/seamless-scroll ## Basic Information - **Project Name**: seamless-scroll - **Description**: js seamless scrolling(js无缝滚动) - **Primary Language**: Unknown - **License**: MIT - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 1 - **Created**: 2021-06-29 - **Last Updated**: 2023-01-11 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # seamless-scroll > js seamless-scroll plugin [![Build Status](https://img.shields.io/appveyor/ci/gruntjs/grunt/master.svg) ![LICENSE MIT](https://img.shields.io/npm/l/express.svg)](https://www.npmjs.com/package/seamscroll) ![](https://img.shields.io/npm/v/seamscroll.svg)

🌾 sample demo | 📘 中文文档

## Browser support | [IE](http://godban.github.io/browsers-support-badges/)
IE | [Firefox](http://godban.github.io/browsers-support-badges/)
Firefox | [Chrome](http://godban.github.io/browsers-support-badges/)
Chrome | [Safari](http://godban.github.io/browsers-support-badges/)
Safari | [iOS Safari](http://godban.github.io/browsers-support-badges/)
iOS | [Chrome for Android](http://godban.github.io/browsers-support-badges/)
Android | |:---------:|:---------:|:---------:|:---------:|:---------:|:---------:| | IE7+ | ✓| ✓ | ✓ | ✓ | ✓ | ✓ * mobile gestures are not supported. ## Installation ### NPM ```bash npm install seamscroll --save ``` ### CDN `https://cdn.jsdelivr.net/npm/seamscroll@0.0.11/build/seamscroll.min.js` ## Usage ```js const seamless = require('seamscroll') `or` import seamless from 'seamscroll' seamless.init({ dom: document.getElementById('demo1') }) //script tag ``` ## Demo ```css .demo2 { width: 600px; height: 100px; position: relative; overflow: hidden; margin-top: 100px; } .list2 li { float: left; width: 100px; height: 100px; margin-right: 20px; text-align: center; font-size: 20px; color: #fff; line-height:100px; background-color: #ccc; } ``` ```html
``` ```javascript seamscroll.init({ dom: document.getElementById('demo2'), direction: 2 }) ``` ## Configure *Required parameters(dom) |key|description|default|val| |:---|---|---|---| |`*dom`|the role of the element|`null`|`dom`| |`step`|step,the faster the rolling speed is faster|`1`|`Number`| |`hoverStop`|mouse hover control is enabled|`true`|`Boolean`| |`direction`|0 down 1 up 2 left 3 right|`1`|`Number`| |`singleHeight`|one single stop height(default zero is seamless) => direction 0/1|`0`|`Number`| |`singleWidth`|one single stop width(default zero is seamless) => direction 2/3|`0`|`Number`| |`waitTime`|one single data stop wait time(1s)|`1000`|`Number`| ## Changelog See the GitHub [release history](https://github.com/chenxuan0000/seamless-scroll/releases). ## License seamless-scroll is open source and released under the [MIT License](LICENSE).