guide.html 8.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="utf-8">
  5. <title>开场动画</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. <style>
  11. #close {
  12. position: absolute;
  13. width: 160px;
  14. left: 50%;
  15. margin-left: -80px;
  16. bottom: 15%;
  17. padding: 10px;
  18. color: #fff;
  19. border-color: #fff;
  20. }
  21. .item-logo {
  22. width: 100%;
  23. height: 100%;
  24. position: relative;
  25. }
  26. .item-logo a {
  27. width: 200px;
  28. height: 200px;
  29. display: block;
  30. border: 1px solid #FFFFFF;
  31. border-color: rgba(255, 255, 255, 0.5);
  32. text-align: center;
  33. line-height: 200px;
  34. border-radius: 50%;
  35. font-size: 40px;
  36. color: #fff;
  37. position: absolute;
  38. top: 15%;
  39. left: 50%;
  40. margin-left: -100px;
  41. }
  42. .animate {
  43. position: absolute;
  44. left: 0;
  45. bottom: 15%;
  46. width: 100%;
  47. color: #fff;
  48. display: -moz-box;
  49. }
  50. .animate h2 {
  51. text-align: center;
  52. margin-bottom: 20px;
  53. }
  54. .animate li {
  55. width: 50%;
  56. height: 30px;
  57. line-height: 30px;
  58. list-style: none;
  59. font-size: 16px;
  60. text-align: right;
  61. }
  62. .animate li:nth-child(3) {
  63. text-align: left;
  64. float: right;
  65. }
  66. .animated {
  67. -webkit-animation-duration: 1s;
  68. -webkit-animation-play-state: paused;
  69. -webkit-animation-fill-mode: both;
  70. }
  71. .guide-show .bounceInDown {
  72. -webkit-animation-name: bounceInDown;
  73. -webkit-animation-play-state: running;
  74. -webkit-animation-delay: 1s;
  75. display: block;
  76. }
  77. .guide-show .bounceInLeft {
  78. -webkit-animation-name: bounceInLeft;
  79. display: block;
  80. -webkit-animation-play-state: running;
  81. }
  82. .guide-show .bounceInRight {
  83. -webkit-animation-name: bounceInRight;
  84. display: block;
  85. -webkit-animation-play-state: running;
  86. -webkit-animation-delay: 0.5s;
  87. }
  88. @-webkit-keyframes bounceInDown {
  89. 0%, 60%, 75%, 90%, 100% {
  90. -webkit-animation-timing-function: cubic-bezier(0.215, 0.610, 0.355, 1.000);
  91. animation-timing-function: cubic-bezier(0.215, 0.610, 0.355, 1.000);
  92. }
  93. 0% {
  94. opacity: 0;
  95. -webkit-transform: translate3d(0, -3000px, 0);
  96. transform: translate3d(0, -3000px, 0);
  97. }
  98. 60% {
  99. opacity: 1;
  100. -webkit-transform: translate3d(0, 25px, 0);
  101. transform: translate3d(0, 25px, 0);
  102. }
  103. 75% {
  104. -webkit-transform: translate3d(0, -5px, 0);
  105. transform: translate3d(0, -5px, 0);
  106. }
  107. 90% {
  108. -webkit-transform: translate3d(0, 3px, 0);
  109. transform: translate3d(0, 3px, 0);
  110. }
  111. 100% {
  112. -webkit-transform: none;
  113. transform: none;
  114. }
  115. }
  116. @-webkit-keyframes bounceInLeft {
  117. 0%, 60%, 75%, 90%, 100% {
  118. -webkit-animation-timing-function: cubic-bezier(0.215, 0.610, 0.355, 1.000);
  119. animation-timing-function: cubic-bezier(0.215, 0.610, 0.355, 1.000);
  120. }
  121. 0% {
  122. opacity: 0;
  123. -webkit-transform: translate3d(-3000px, 0, 0);
  124. transform: translate3d(-3000px, 0, 0);
  125. }
  126. 60% {
  127. opacity: 1;
  128. -webkit-transform: translate3d(25px, 0, 0);
  129. transform: translate3d(25px, 0, 0);
  130. }
  131. 75% {
  132. -webkit-transform: translate3d(-10px, 0, 0);
  133. transform: translate3d(-10px, 0, 0);
  134. }
  135. 90% {
  136. -webkit-transform: translate3d(5px, 0, 0);
  137. transform: translate3d(5px, 0, 0);
  138. }
  139. 100% {
  140. -webkit-transform: none;
  141. transform: none;
  142. }
  143. }
  144. @-webkit-keyframes bounceInRight {
  145. 0%, 60%, 75%, 90%, 100% {
  146. -webkit-animation-timing-function: cubic-bezier(0.215, 0.610, 0.355, 1.000);
  147. animation-timing-function: cubic-bezier(0.215, 0.610, 0.355, 1.000);
  148. }
  149. 0% {
  150. opacity: 0;
  151. -webkit-transform: translate3d(3000px, 0, 0);
  152. transform: translate3d(3000px, 0, 0);
  153. }
  154. 60% {
  155. opacity: 1;
  156. -webkit-transform: translate3d(-25px, 0, 0);
  157. transform: translate3d(-25px, 0, 0);
  158. }
  159. 75% {
  160. -webkit-transform: translate3d(10px, 0, 0);
  161. transform: translate3d(10px, 0, 0);
  162. }
  163. 90% {
  164. -webkit-transform: translate3d(-5px, 0, 0);
  165. transform: translate3d(-5px, 0, 0);
  166. }
  167. 100% {
  168. -webkit-transform: none;
  169. transform: none;
  170. }
  171. }
  172. </style>
  173. </head>
  174. <body>
  175. <div id="slider" class="mui-slider mui-fullscreen" style="background-color: black;">
  176. <div class="mui-slider-group">
  177. <!-- 第一张 -->
  178. <div class="mui-slider-item">
  179. <div class="item-logo" style="background-image: url(../images/source/guide1.png);
  180. background-repeat: no-repeat;background-size: 100% 100%;">
  181. <a href="#">
  182. <img src="../images/person/header-login.png" style="width:150px;margin-top: 10%;" />
  183. </a>
  184. <div class="animate guide-show">
  185. <h2 class="animated bounceInDown">小巧高能</h2>
  186. <li class="animated bounceInLeft">简单方便</li>
  187. <li class="animated bounceInRight">上千种书籍</li>
  188. </div>
  189. </div>
  190. </div>
  191. <!-- 第二张 -->
  192. <div class="mui-slider-item">
  193. <div class="item-logo" style="background-image: url(../images/source/guide2.png);
  194. background-repeat: no-repeat;background-size: 100% 100%;">
  195. <a href="#">
  196. <img src="../images/person/header-login.png" style="width:150px;margin-top: 10%;" />
  197. </a>
  198. <div id="tips-2" class="animate mui-hidden">
  199. <h2 class="animated bounceInDown">原创文章</h2>
  200. <li class="animated bounceInLeft">彰显个人魅力</li>
  201. <li class="animated bounceInRight">表达现实生活</li>
  202. </div>
  203. </div>
  204. </div>
  205. <!-- 第三张 -->
  206. <!--<div class="mui-slider-item">
  207. <div class="item-logo" style="background-image: url(../images/source/guide3.png);
  208. background-repeat: no-repeat;background-size: 100% 100%;">
  209. <a href="#">
  210. <img src="../images/person/header-login.png" style="width:150px;margin-top: 10%;" />
  211. </a>
  212. <div id="tips-3" class="animate mui-hidden">
  213. <h2 class="animated bounceInDown">流畅体验</h2>
  214. <li class="animated bounceInLeft">整个世界都美好了</li>
  215. <li class="animated bounceInRight">收藏你的挚爱</li>
  216. </div>
  217. </div>
  218. </div>-->
  219. <!-- 第四张 -->
  220. <div class="mui-slider-item">
  221. <div class="item-logo" style="background-image: url(../images/source/guide3.png);
  222. background-repeat: no-repeat;background-size: 100% 100%;">
  223. <a href="#">
  224. <img src="../images/person/header-login.png" style="width:150px;margin-top: 10%;" />
  225. </a>
  226. <div class="animate">
  227. <button id='close' class="mui-btn mui-btn-warning mui-btn-outlined">立即体验</button>
  228. </div>
  229. </div>
  230. </div>
  231. </div>
  232. <div class="mui-slider-indicator">
  233. <div class="mui-indicator mui-active"></div>
  234. <div class="mui-indicator"></div>
  235. <!--<div class="mui-indicator"></div>-->
  236. <div class="mui-indicator"></div>
  237. </div>
  238. </div>
  239. <!--
  240. 作者:HZC
  241. 时间:2015-08-26
  242. 描述:起始页
  243. -->
  244. <script src="../js/mui.min.js" type="text/javascript" charset="utf-8"></script>
  245. <script src="../js/app.js" type="text/javascript" charset="utf-8"></script>
  246. <script src="../js/db/dicBook.js" type="text/javascript" charset="utf-8"></script>
  247. <script src="../js/db/dicCategory.js" type="text/javascript" charset="utf-8"></script>
  248. <script src="../js/db/hzc.initDb.js" type="text/javascript" charset="utf-8"></script>
  249. <script type="text/javascript">
  250. mui.back = function() {};
  251. mui.plusReady(function() {
  252. plus.navigator.setFullscreen(true);
  253. setAppVersion();
  254. if (mui.os.ios) {
  255. plus.navigator.setFullscreen(true);
  256. }
  257. plus.navigator.closeSplashscreen();
  258. mui.back = function() {}
  259. });
  260. //立即体验按钮点击事件
  261. document.getElementById("close").addEventListener('tap', function(event) {
  262. // plus.storage.setItem("lauchFlag", "true");
  263. // plus.webview.currentWebview().close();
  264. plus.navigator.setFullscreen(false);
  265. mui.openWindow({
  266. id: 'login-id',
  267. url: '../login.html',
  268. show: {
  269. duration: 200
  270. }
  271. });
  272. }, false);
  273. //图片切换时,触发动画
  274. document.querySelector('.mui-slider').addEventListener('slide', function(event) {
  275. //注意slideNumber是从0开始的;
  276. var index = event.detail.slideNumber + 1;
  277. if (index == 2 /*|| index == 3*/) {
  278. var item = document.getElementById("tips-" + index);
  279. if (item.classList.contains("mui-hidden")) {
  280. item.classList.remove("mui-hidden");
  281. item.classList.add("guide-show");
  282. }
  283. }
  284. });
  285. </script>
  286. </body>
  287. </html>