options-minScrollbarLength.html 964 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <link href="../css/perfect-scrollbar.css" rel="stylesheet">
  5. <script src="../dist/perfect-scrollbar.js"></script>
  6. <style>
  7. .container {
  8. position: relative;
  9. margin: 30px auto;
  10. padding: 0px;
  11. width: 600px;
  12. height: 400px;
  13. overflow: auto;
  14. }
  15. .container .content {
  16. background-image: url('./assets/azusa.jpg');
  17. width: 12800px;
  18. height: 7200px;
  19. color: blue;
  20. font-size: 20px;
  21. }
  22. </style>
  23. </head>
  24. <body>
  25. <div class="container">
  26. <div class="content">
  27. default
  28. </div>
  29. </div>
  30. <div class="container">
  31. <div class="content">
  32. minScrollbarLength: 200px
  33. </div>
  34. </div>
  35. <script>
  36. var containers = document.querySelectorAll('.container');
  37. new PerfectScrollbar(containers[0]);
  38. new PerfectScrollbar(containers[1], {
  39. minScrollbarLength: 200
  40. });
  41. </script>
  42. </body>
  43. </html>