You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

172 lines
4.7 KiB

3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
  1. <link rel="stylesheet" type="text/css" href="css/game5.css" />
  2. <div class="game5Index">
  3. <p class="bgm">
  4. <img src="img/game5/bgm.png" />
  5. <img src="img/game5/successBgm.png" />
  6. </p>
  7. <div class="box_wrap">
  8. <ul class="imgList">
  9. <li><img style="width: .96rem;" src="img/game5/lin1.png" />
  10. <p></p>
  11. </li>
  12. <li><img style="width: .92rem;" src="img/game5/lin2.png" />
  13. <p></p>
  14. </li>
  15. <li><img style="width: .94rem;" src="img/game5/lin3.png" />
  16. <p></p>
  17. </li>
  18. <!--<li></li>
  19. <li></li>
  20. <li></li>-->
  21. </ul>
  22. <div class="clickIcon">
  23. <ul>
  24. <li class="click1 click"><img src="img/game5/icon1.png"/></li>
  25. <li class="click2 click"><img src="img/game5/icon2.png"/></li>
  26. <li class="click3 click"><img src="img/game5/icon3.png"/></li>
  27. </ul>
  28. </div>
  29. </div>
  30. <div class="book_box">
  31. <div class="line">
  32. <!--<p class="leftIcon">
  33. < </p>
  34. <p class="rightIcon"> > </p>-->
  35. </div>
  36. <div class="closeIcon"><img src="img/close.png" /></div>
  37. <div class="bookCont">
  38. <div class="leftImg">
  39. <div class="titleTip">
  40. <p>九个炊事员</p>
  41. <p class="img"><img src="img/img2.png" /></p>
  42. </div>
  43. <div class="imgList">
  44. <img src="img/game5.png" />
  45. </div>
  46. </div>
  47. <div class="rightCont">
  48. <div class="titleTip">
  49. <h2>故事原型</h2>
  50. <h5>九个炊事员</h5>
  51. </div>
  52. <ul class="textList">
  53. <video width="210" height="150" style="object-fit: fill;" id="video5" controls="controls">
  54. <source src="img/video/game5.mp4" type="video/mp4"></source>
  55. </video>
  56. </ul>
  57. <!--<p class="pageNum"><text>1</text>/<span>5</span></p>-->
  58. </div>
  59. </div>
  60. </div>
  61. <div class="maskBgm"></div>
  62. <!--下一关-->
  63. <div class="successBox">
  64. <!--<div class="shut"><img src="img/close.png" /></div>-->
  65. <!--<p class="above game5Above"><img src="img/aboveIcon.png" /></p>-->
  66. <p class="next game5Next"><img src="img/game5/sure.png" /></p>
  67. </div>
  68. </div>
  69. <script type="text/javascript">
  70. var num5 = [];
  71. var video5 = document.getElementById("video5");
  72.   video5.loop = false;
  73.   video5.addEventListener('ended', function () {
  74. $('.book_box').fadeOut()
  75. $('.successBox').css('display', 'flex')
  76.   //监听到播放结束后,在此处可调用自己的接口
  77. console.log('播放完毕5')
  78.   }, false);
  79. $('.game5Index .click1').click(function() {
  80. $('.game5Index .click1 img').css('display','block')
  81. $('.game5Index .click1').animate({
  82. 'top': '1.5%',
  83. "right": '17.5%',
  84. 'transform': 'translate(-50%,-50%)'
  85. }, 1000)
  86. $('.game5Index .imgList li').eq(0).find('img').fadeOut(1500)
  87. $('.game5Index .imgList li').eq(0).find('p').fadeOut(1000)
  88. if(num5.indexOf('1')==-1){
  89. num5.push('1');
  90. success5();
  91. }
  92. })
  93. $('.game5Index .click2').click(function() {
  94. $('.game5Index .click2 img').css('display','block')
  95. $('.game5Index .click2').animate({
  96. 'top': '3%',
  97. "right": '11.5%',
  98. 'transform': 'translate(-50%,-50%)'
  99. }, 1000)
  100. $('.game5Index .imgList li').eq(1).find('img').fadeOut(1500)
  101. $('.game5Index .imgList li').eq(1).find('p').fadeOut(1000)
  102. if(num5.indexOf('2')==-1){
  103. num5.push('2');
  104. success5();
  105. }
  106. })
  107. $('.game5Index .click3').click(function() {
  108. $('.game5Index .click3 img').css('display','block')
  109. $('.game5Index .click3').animate({
  110. 'top': '3%',
  111. "right": '1.5%',
  112. 'transform': 'translate(-50%,-50%)',
  113. }, 1000)
  114. $('.game5Index .imgList li').eq(2).find('img').fadeOut(1500)
  115. $('.game5Index .imgList li').eq(2).find('p').fadeOut(1000)
  116. if(num5.indexOf('3')==-1){
  117. num5.push('3');
  118. success5();
  119. }
  120. })
  121. $('.game5Index .closeIcon').click(function() {
  122. $('.book_box').fadeOut()
  123. $('.successBox').css('display', 'flex')
  124. video5.pause()
  125. })
  126. function success5() {
  127. if(num5.length == 3) {
  128. console.log('成功')
  129. setTimeout(function() {
  130. $('.game5Index p.bgm img').eq(0).animate({
  131. 'opacity':'0'
  132. },1000)
  133. $('.game5Index p.bgm img').eq(1).animate({
  134. 'opacity':'1',
  135. 'z-index':'99'
  136. },1000)
  137. $('.game5Index .box_wrap').fadeOut();
  138. }, 1500)
  139. setTimeout(function() {
  140. $('.game5Index .book_box').fadeIn()
  141. $('.game5Index .maskBgm').fadeIn(1000)
  142. video5.play()
  143. }, 4500)
  144. }
  145. }
  146. $('.game5Above').click(function(){
  147. $('#game4').load('game4.html');
  148. $('.game5Index').remove();
  149. $('.fiveGame').css({'width':'0','height':'0'})
  150. $('#game5').css({'width':'0','height':'0'})
  151. $('.fourGame').css({'width':'100%','height':'100%'})
  152. $('#game4').css({'width':'100%','height':'100%'})
  153. })
  154. $('.game5Next').click(function(){
  155. $('.game5Index').remove();
  156. $('#success').load('success.html');
  157. $('.fiveGame').css({'width':'0','height':'0'})
  158. $('#game5').css({'width':'0','height':'0'})
  159. $('.win').css({'width':'100%','height':'100%'})
  160. $('#success').css({'width':'100%','height':'100%'})
  161. })
  162. </script>