PageRenderTime 44ms CodeModel.GetById 19ms RepoModel.GetById 0ms app.codeStats 0ms

/5.0/demos/scroll-view/cited-by-md/scrollbar.html

https://github.com/kissyteam/kissyteam.github.com
HTML | 115 lines | 103 code | 12 blank | 0 comment | 0 complexity | 0a5658eb297a4d98aeb2c577e8f22a27 MD5 | raw file
Possible License(s): Apache-2.0
  1. <!doctype html>
  2. <html>
  3. <head>
  4. <meta charset="utf-8"/>
  5. <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=no">
  6. <meta name="apple-mobile-web-app-capable" content="yes">
  7. <meta http-equiv="X-UA-Compatible" content="IE=edge" />
  8. <meta name="apple-touch-fullscreen" content="yes">
  9. <title>滚动容器边栏显示滚动条</title>
  10. <link rel="stylesheet" type="text/css" href="//g.alicdn.com/kissy/k/5.0.1/scroll-view/assets/dpl.css">
  11. <script type="text/javascript" src="//g.alicdn.com/kissy/k/5.0.1/seed-debug.js" data-config="{combine:true}"></script>
  12. <style>
  13. body{
  14. background: #fff;
  15. }
  16. body, ul, li {
  17. padding: 0;
  18. margin: 0;
  19. border: 0;
  20. }
  21. html, body {
  22. font-size: 12px;
  23. -webkit-text-size-adjust: none;
  24. font-family: helvetica;
  25. overflow: hidden;
  26. }
  27. #header {
  28. position: absolute;
  29. top: 0;
  30. left: 0;
  31. width: 100%;
  32. height: 45px;
  33. line-height: 45px;
  34. background-color: #00A0E9;
  35. padding: 0;
  36. color: #eee;
  37. font-size: 20px;
  38. text-align: center;
  39. }
  40. #header a {
  41. color: #f3f3f3;
  42. text-decoration: none;
  43. font-weight: bold;
  44. text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.5);
  45. }
  46. #footer {
  47. position: absolute;
  48. bottom: 0;
  49. left: 0;
  50. width: 100%;
  51. height: 48px;
  52. background-color: #888;
  53. padding: 0;
  54. border-top: 1px solid #444;
  55. }
  56. #wrapper {
  57. position: absolute;
  58. top: 45px;
  59. bottom: 48px;
  60. left: 0;
  61. width: 100%;
  62. background: #555;
  63. overflow: auto;
  64. }
  65. .ks-ie6 #wrapper {
  66. height: expression(document.documentElement.clientHeight-48-45);
  67. }
  68. #wrapper p {
  69. margin: 0;
  70. padding: 0 10px;
  71. height: 40px;
  72. line-height: 40px;
  73. border-bottom: 1px solid #ccc;
  74. border-top: 1px solid #fff;
  75. background-color: #fafafa;
  76. font-size: 14px;
  77. }
  78. </style>
  79. </head>
  80. <body>
  81. <div id="header">KISSY ScrollView</div>
  82. <div id="wrapper" class="ks-scroll-view">
  83. <div class="ks-scroll-view-content">
  84. <div id="thelist">
  85. </div>
  86. </div>
  87. </div>
  88. <div id="footer"></div>
  89. <script>
  90. require(['node', 'scroll-view', 'scroll-view/plugin/scrollbar'], function ($, ScrollView, ScrollbarPlugin) {
  91. var content = '';
  92. for (var i = 1; i < 40; i++) {
  93. content += '<p>line ' + i + '</p>'
  94. }
  95. $('#thelist').html(content);
  96. window.scrollView = new ScrollView({
  97. srcNode: '#wrapper',
  98. plugins: [new ScrollbarPlugin({})]
  99. }).render();
  100. });
  101. </script>
  102. </body>
  103. </html>