options-wheelSpeed.html 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta http-equiv="content-type" content="text/html; charset=utf-8">
  5. <title>perfect-scrollbar example</title>
  6. <link href="../dist/css/perfect-scrollbar.css" rel="stylesheet">
  7. <script src="../dist/js/perfect-scrollbar.js"></script>
  8. <style>
  9. .contentHolder { position:relative; margin:0px auto; padding:0px; width: 600px; height: 400px; overflow: auto; }
  10. .contentHolder .content { background-image: url('./azusa.jpg'); width: 1280px; height: 720px; }
  11. .spacer { text-align:center }
  12. </style>
  13. </head>
  14. <body>
  15. <h1 style="text-align:center">Default; wheelSpeed:1</h1>
  16. <div id="Default" class="contentHolder">
  17. <div class="content">
  18. </div>
  19. </div>
  20. <h1 style="text-align:center">Fast: wheelSpeed:10</h1>
  21. <div id="FastWheelSpeed" class="contentHolder">
  22. <div class="content">
  23. </div>
  24. </div>
  25. <h1 style="text-align:center">Slow: wheelSpeed:0.1</h1>
  26. <div id="SlowWheelSpeed" class="contentHolder">
  27. <div class="content">
  28. </div>
  29. </div>
  30. <script>
  31. var $ = document.querySelector.bind(document);
  32. window.onload = function () {
  33. Ps.initialize($('#Default'));
  34. Ps.initialize($('#FastWheelSpeed'), {wheelSpeed: 10});
  35. Ps.initialize($('#SlowWheelSpeed'), {wheelSpeed: 0.1});
  36. };
  37. </script>
  38. </body>
  39. </html>