Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

README.md 2.6 KiB

il y a 3 ans
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. # Smooth Scrollbar
  2. [![npm][npm-version-badge]](https://www.npmjs.com/package/smooth-scrollbar)
  3. [![monthly downloads][npm-downloads-badge]](https://www.npmjs.com/package/smooth-scrollbar)
  4. [![core size][size-badge]](dist/smooth-scrollbar.js)
  5. [![gzip size][gzip-size-badge]](dist/smooth-scrollbar.js)
  6. [![Build status][travis-badge]](https://travis-ci.org/idiotWu/smooth-scrollbar)
  7. Customizable, Flexible, and High Performance Scrollbars!
  8. ## Installation
  9. > ⚠️ DO NOT use custom scrollbars unless you know what you are doing. [Read more](docs/caveats.md)
  10. Via NPM **(recommended)**:
  11. ```
  12. npm install smooth-scrollbar --save
  13. ```
  14. Via Bower:
  15. ```
  16. bower install smooth-scrollbar --save
  17. ```
  18. ## Browser Compatibility
  19. | Browser | Version |
  20. | :------ | :-----: |
  21. | IE | 10+ |
  22. | Chrome | 22+ |
  23. | Firefox | 16+ |
  24. | Safari | 8+ |
  25. | Android Browser | 4+ |
  26. | Chrome for Android | 32+ |
  27. | iOS Safari | 7+ |
  28. ## Demo
  29. https://idiotwu.github.io/smooth-scrollbar/
  30. ## Usage
  31. Since this package has a [pkg.module](https://github.com/rollup/rollup/wiki/pkg.module) field, it's highly recommended to import it as an ES6 module with some bundlers like [webpack](https://webpack.js.org/) or [rollup](https://rollupjs.org/):
  32. ```js
  33. import Scrollbar from 'smooth-scrollbar';
  34. Scrollbar.init(document.querySelector('#my-scrollbar'));
  35. ```
  36. If you are not using any bundlers, you can just load the UMD bundle:
  37. ```html
  38. <script src="dist/smooth-scrollbar.js"></script>
  39. <script>
  40. var Scrollbar = window.Scrollbar;
  41. Scrollbar.init(document.querySelector('#my-scrollbar'));
  42. </script>
  43. ```
  44. ## Documentation
  45. | [latest](docs) | [7.x](https://github.com/idiotWu/smooth-scrollbar/tree/7.x) |
  46. |----|----|
  47. ## Who's Using It
  48. - [conference.awwwards.com](https://conference.awwwards.com/): Awwwards Conference - An Event for UX / UI Designers and Web Developers.
  49. - [lp.anzi.kr](http://lp.anzi.kr/): Listeners Playlist.
  50. - [Matter](https://matterapp.com/): A new and better way to grow your professional skills.
  51. - Feel free to add yours here 🤗.
  52. ## License
  53. [MIT](LICENSE)
  54. [npm-version-badge]: https://img.shields.io/npm/v/smooth-scrollbar.svg?style=for-the-badge
  55. [npm-downloads-badge]: https://img.shields.io/npm/dm/smooth-scrollbar.svg?style=for-the-badge
  56. [travis-badge]: https://img.shields.io/travis/idiotWu/smooth-scrollbar.svg?style=for-the-badge
  57. [size-badge]: http://img.badgesize.io/idiotWu/smooth-scrollbar/master/dist/smooth-scrollbar.js?label=core%20size&style=for-the-badge
  58. [gzip-size-badge]: http://img.badgesize.io/idiotWu/smooth-scrollbar/master/dist/smooth-scrollbar.js?label=gzip%20size&compression=gzip&style=for-the-badge