index.html 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta>
  5. <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
  6. <title>demo</title>
  7. <style>
  8. html,
  9. body {
  10. font-family: "Helvetica Neue", Helvetica, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "微软雅黑", Arial, sans-serif;
  11. margin: 0;
  12. padding: 0;
  13. background: #eeeeee;
  14. }
  15. html {
  16. height: 100vh;
  17. }
  18. header {
  19. text-align: center;
  20. padding: 20px 0;
  21. font-weight: bold;
  22. }
  23. section {
  24. width: 1100px;
  25. margin: 20px auto;
  26. }
  27. h1 {
  28. color: #686c6e;
  29. }
  30. code {
  31. font-family: 'Inconsolata', Monaco, Consolas, 'Andale Mono', monospace;
  32. border: solid 1px rgba(51, 51, 51, 0.12);
  33. background: #f5f2f0;
  34. padding: 15px 20px;
  35. display: block;
  36. }
  37. a {
  38. text-decoration: none;
  39. color: #409eff;
  40. }
  41. ul.demo {
  42. margin: 0;
  43. padding: 0;
  44. }
  45. ul.demo>li {
  46. list-style: none;
  47. margin: 20px;
  48. padding: 0;
  49. float: left;
  50. width: calc(50% - 20px);
  51. width: -webkit-calc(50% - 20px);
  52. background: #fff;
  53. overflow: hidden;
  54. border-radius: 4px;
  55. cursor: pointer;
  56. -webkit-transition: all .15s linear;
  57. transition: all .15s linear;
  58. -webkit-box-shadow: 0 2px 2px 0 rgba(0, 0, 0, 0.14), 0 1px 5px 0 rgba(0, 0, 0, 0.12), 0 3px 1px -2px rgba(0, 0, 0, 0.2);
  59. box-shadow: 0 2px 2px 0 rgba(0, 0, 0, 0.14), 0 1px 5px 0 rgba(0, 0, 0, 0.12), 0 3px 1px -2px rgba(0, 0, 0, 0.2);
  60. }
  61. ul.demo>li:hover {
  62. -webkit-box-shadow: 0 8px 10px 1px rgba(0, 0, 0, 0.14), 0 3px 14px 2px rgba(0, 0, 0, 0.12), 0 5px 5px -3px rgba(0, 0, 0, 0.3);
  63. box-shadow: 0 8px 10px 1px rgba(0, 0, 0, 0.14), 0 3px 14px 2px rgba(0, 0, 0, 0.12), 0 5px 5px -3px rgba(0, 0, 0, 0.3);
  64. }
  65. ul.demo>li:nth-child(odd) {
  66. margin-left: 0;
  67. }
  68. ul.demo>li:nth-child(even) {
  69. margin-right: 0;
  70. }
  71. ul.demo>li>a>img {
  72. width: 100%;
  73. height: 250px;
  74. }
  75. ul.demo>li>a>.title {
  76. text-align: center;
  77. margin: 10px 0;
  78. }
  79. </style>
  80. </head>
  81. <body>
  82. <header>
  83. <h1>vue-gemini-scrollbar</h1>
  84. </header>
  85. <section>
  86. <code>npm install vue-gemini-scrollbar --save</code>
  87. </section>
  88. <section>
  89. <p>All demos were rewrite by
  90. <a href="https://github.com/lx544690189/vue-gemini-scrollbar">vue-gemini-scrollbar</a> from
  91. <a href="https://github.com/noeldelgado/gemini-scrollbar">gemini-scrollbar/examples</a>
  92. </p>
  93. </section>
  94. <section>
  95. <ul class="demo">
  96. <li>
  97. <a href="./demo/00-sidebar.html">
  98. <img src="imgs/demo-sidebar.png" alt="sidebar">
  99. <div class="title">sidebar</div>
  100. </a>
  101. </li>
  102. <li>
  103. <a href="./demo/01-body.html">
  104. <img src="imgs/demo-body.png" alt="sidebar">
  105. <div class="title">body</div>
  106. </a>
  107. </li>
  108. <li>
  109. <a href="./demo/03-grid.html">
  110. <img src="imgs/demo-grid.png" alt="sidebar">
  111. <div class="title">grid</div>
  112. </a>
  113. </li>
  114. <li>
  115. <a href="./demo/04-random-tests.html">
  116. <img src="imgs/demo-random-tests.png" alt="sidebar">
  117. <div class="title">random</div>
  118. </a>
  119. </li>
  120. <li>
  121. <a href="./demo/05-destroy.html">
  122. <img src="imgs/demo-destroy.png" alt="sidebar">
  123. <div class="title">destroy</div>
  124. </a>
  125. </li>
  126. </ul>
  127. </section>
  128. <script src="js/vue.js" type="text/javascript"></script>
  129. <script src="js/vue-gemini-scrollbar.js" type="text/javascript"></script>
  130. <script type="text/javascript">
  131. var scrollbar = new Vue.$geminiScrollbar({
  132. element: document.body
  133. }).create();
  134. </script>
  135. </body>
  136. </html>