indexDetaile.html 6.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="utf-8">
  5. <title>Hello MUI</title>
  6. <meta name="viewport" content="width=device-width, initial-scale=1,maximum-scale=1,user-scalable=no">
  7. <meta name="apple-mobile-web-app-capable" content="yes">
  8. <meta name="apple-mobile-web-app-status-bar-style" content="black">
  9. <link rel="stylesheet" href="css/mui.min.css">
  10. <link rel="stylesheet" href="css/style.css">
  11. <link rel="stylesheet" type="text/css" href="css/swiper.css">
  12. <link rel="stylesheet" href="http://m.ydui.org/css/ydui.css" />
  13. <!-- 引入YDUI自适应解决方案类库 -->
  14. <script src="http://m.ydui.org/js/ydui.flexible.js"></script>
  15. <style>
  16. html,
  17. body {
  18. background-color: #efeff4;
  19. }
  20. p {
  21. margin: 0;
  22. }
  23. span.mui-icon {
  24. font-size: 14px;
  25. color: #007aff;
  26. margin-left: -15px;
  27. padding-right: 10px;
  28. }
  29. .mui-off-canvas-right {
  30. color: #fff;
  31. }
  32. .title {
  33. margin: 16px 15px 10px;
  34. }
  35. .title+.content {
  36. margin: 10px 15px 35px;
  37. color: #bbb;
  38. text-indent: 1em;
  39. font-size: 14px;
  40. line-height: 24px;
  41. }
  42. input {
  43. color: #000;
  44. }
  45. .buoy{
  46. width: 50px;
  47. height: 50px;
  48. line-height: 50px;
  49. position: fixed;
  50. top: 40%;
  51. left: 0;
  52. z-index: 2;
  53. -webkit-border-radius: 50%;
  54. -moz-border-radius: 50%;
  55. border-radius: 50%;
  56. padding: 0;
  57. text-align: center;
  58. box-shadow: 0 0 4px 1px #D1D2D2;
  59. background: #fff;
  60. }
  61. .buoy a{
  62. display: block;
  63. }
  64. .swiper-slide img{
  65. width: 100%;
  66. height: 209px;
  67. border-radius: 5px;
  68. }
  69. .banner-tit{
  70. position: absolute;
  71. bottom: 0;
  72. left: 0;
  73. height: 33px;
  74. line-height: 33px;
  75. text-indent: 5px;
  76. color: #fff;
  77. background: rgba(0,0,0,.5);
  78. width: 100%;
  79. font-size: 12px;
  80. border-bottom-left-radius: 5px;
  81. border-bottom-right-radius: 5px;
  82. }
  83. .banner-tit p{
  84. color: #fff;
  85. border-bottom-left-radius: 5px;
  86. border-bottom-right-radius: 5px;
  87. }
  88. .swiper-pagination{
  89. bottom: 5px;
  90. right: 5px;
  91. width: auto;
  92. color: white;
  93. text-align: right;
  94. font-size: 12px;
  95. }
  96. .swiper-slide a{
  97. height: 100%;
  98. display: block;
  99. }
  100. .mui-scroll-wrapper{
  101. overflow-y: scroll !important;
  102. }
  103. </style>
  104. </head>
  105. <body>
  106. <!--侧滑菜单容器-->
  107. <div id="offCanvasWrapper" class="mui-off-canvas-wrap mui-draggable mui-slide-in">
  108. <!--菜单部分-->
  109. <aside id="offCanvasSide" class="mui-off-canvas-right">
  110. <div id="offCanvasSideScroll" class="mui-scroll-wrapper">
  111. <div class="mui-scroll">
  112. <div class="title">侧滑导航</div>
  113. <div class="title" style="margin-bottom: 25px;">侧滑列表示例</div>
  114. <ul class="mui-table-view mui-table-view-chevron mui-table-view-inverted">
  115. <li class="mui-table-view-cell">
  116. <a class="mui-navigate-right">
  117. Item 1
  118. </a>
  119. </li>
  120. <li class="mui-table-view-cell">
  121. <a class="mui-navigate-right">
  122. Item 2
  123. </a>
  124. </li>
  125. <li class="mui-table-view-cell">
  126. <a class="mui-navigate-right">
  127. Item 3
  128. </a>
  129. </li>
  130. <li class="mui-table-view-cell">
  131. <a class="mui-navigate-right">
  132. Item 4
  133. </a>
  134. </li>
  135. <li class="mui-table-view-cell">
  136. <a class="mui-navigate-right">
  137. Item 5
  138. </a>
  139. </li>
  140. <li class="mui-table-view-cell">
  141. <a class="mui-navigate-right">
  142. Item 6
  143. </a>
  144. </li>
  145. </ul>
  146. </div>
  147. </div>
  148. </aside>
  149. <div class="mui-inner-wrap">
  150. <div id="offCanvasContentScroll" class="mui-content mui-scroll-wrapper">
  151. <div class="mui-scroll" id="contents">
  152. </div>
  153. </div>
  154. <!--目录-->
  155. <button class="buoy">
  156. <a id="offCanvasBtn" href="#offCanvasSide">目录</a>
  157. </button>
  158. <!-- off-canvas backdrop -->
  159. <div class="mui-off-canvas-backdrop"></div>
  160. </div>
  161. </div>
  162. <script type="text/javascript" src="js/zepto.js"></script>
  163. <script src="js/axios.min.js"></script>
  164. <script src="js/base64.js"></script>
  165. <script src="js/PDFObjeck.js"></script>
  166. <script src="js/function.js"></script>
  167. <script src="js/mui.min.js"></script>
  168. <script src="js/index.js"></script>
  169. <script type="text/javascript" src="js/swiper.min.js"></script>
  170. <script>
  171. var swiper = new Swiper('.swiper-container', {
  172. // autoplay: true,
  173. loop:true,
  174. pagination: {
  175. el: '.swiper-pagination',
  176. type: 'fraction',
  177. },
  178. autoplay: {
  179. disableOnInteraction: false
  180. }
  181. });
  182. mui.init({
  183. swipeBack: false,
  184. });
  185. //侧滑容器父节点
  186. var offCanvasWrapper = mui('#offCanvasWrapper');
  187. //主界面容器
  188. var offCanvasInner = offCanvasWrapper[0].querySelector('.mui-inner-wrap');
  189. //菜单容器
  190. var offCanvasSide = document.getElementById("offCanvasSide");
  191. //移动效果是否为整体移动
  192. var moveTogether = false;
  193. offCanvasSide.classList.remove('mui-transitioning');
  194. //侧滑容器的class列表,增加.mui-slide-in即可实现菜单移动、主界面不动的效果;
  195. //变换侧滑动画移动效果;
  196. // document.getElementById('offCanvasShow').addEventListener('tap', function() {
  197. // offCanvasWrapper.offCanvas('show');
  198. // });
  199. // document.getElementById('offCanvasHide').addEventListener('tap', function() {
  200. // // offCanvasWrapper.offCanvas('close');
  201. // });
  202. //主界面和侧滑菜单界面均支持区域滚动;
  203. // mui('#offCanvasSideScroll').scroll();
  204. // mui('#offCanvasContentScroll').scroll();
  205. </script>
  206. </body>
  207. </html>