Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/seayxu/backtop
back to top component
https://github.com/seayxu/backtop
Last synced: about 7 hours ago
JSON representation
back to top component
- Host: GitHub
- URL: https://github.com/seayxu/backtop
- Owner: seayxu
- Created: 2016-01-31T15:33:02.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2016-02-03T15:49:16.000Z (almost 9 years ago)
- Last Synced: 2024-11-08T13:54:10.835Z (11 days ago)
- Language: CSS
- Homepage: http://seayxu.github.io/backtop
- Size: 156 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
# BackTop Web Component
This is a web component,back to top or home page.
# Usage
1. download this project dist files.
2. copy dest folder to your project.
3. import .js and .css files to web page.
``` html
```4. add javascript code
``` javascript
BackTop.init(1,500);
```# Sample
``` html
返回顶部组件示例
body{height: 6000px;}
BackTop.init(1,500);
```
# API
## BackTop.init(type,time);
* ### type
>scroll type,default is 0.
0:uniform speed.
1:uniform acceleration speed.
2:uniform deceleration speed.
* ### time
>scroll times,default is 500ms.# Other
Icons : [Linearicons Free v1.0.0][4]
# License
[![CC-BY-SA][2]][1]
[CC-BY-SA 4.0][1] © [SeayXu][3]
[1]:http://creativecommons.org/licenses/by-sa/4.0/
[2]:https://i.creativecommons.org/l/by-sa/4.0/88x31.png
[3]:http://seay.me
[4]:https://linearicons.com/free