scrollbars-on-the-opposite-side.html 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637
  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. /* Change the alignment of scrollbars */
  13. /* Recommended: You can just modify the CSS file directly. */
  14. .ps-container .ps-scrollbar-x-rail {
  15. top: 3px;
  16. bottom: auto; /* If using `top`, there shouldn't be a `bottom`. */
  17. }
  18. .ps-container .ps-scrollbar-y-rail {
  19. left: 3px;
  20. right: auto; /* If using `left`, there shouldn't be a `right`. */
  21. }
  22. </style>
  23. </head>
  24. <body>
  25. <div id="Default" class="contentHolder">
  26. <div class="content">
  27. </div>
  28. </div>
  29. <script>
  30. var $ = document.querySelector.bind(document);
  31. window.onload = function () {
  32. Ps.initialize($('#Default'));
  33. };
  34. </script>
  35. </body>
  36. </html>