Browse Source

初始化项目

master
liuguowei 3 years ago
commit
e57200bf7e
81 changed files with 2640 additions and 0 deletions
  1. 28
      .project
  2. 162
      begin.html
  3. 206
      css/game1.css
  4. 213
      css/game2.css
  5. 201
      css/game3.css
  6. 211
      css/game4.css
  7. 208
      css/game5.css
  8. 223
      css/index.css
  9. 12
      css/style.css
  10. 180
      game1.html
  11. 187
      game2.html
  12. 187
      game3.html
  13. 205
      game4.html
  14. 202
      game5.html
  15. BIN
      img/aboveIcon.png
  16. BIN
      img/begin.png
  17. BIN
      img/beginBtn.png
  18. BIN
      img/bookBgm.png
  19. BIN
      img/close.png
  20. BIN
      img/game1/bgm.png
  21. BIN
      img/game1/icon1.png
  22. BIN
      img/game1/icon2.png
  23. BIN
      img/game1/icon3.png
  24. BIN
      img/game1/kuang.png
  25. BIN
      img/game1/lin1.png
  26. BIN
      img/game1/lin2.png
  27. BIN
      img/game1/lin3.png
  28. BIN
      img/game1/successBgm.png
  29. BIN
      img/game2.png
  30. BIN
      img/game2/game2Bgm.png
  31. BIN
      img/game2/icon1.png
  32. BIN
      img/game2/icon2.png
  33. BIN
      img/game2/icon3.png
  34. BIN
      img/game2/icon31.png
  35. BIN
      img/game2/lin1.png
  36. BIN
      img/game2/lin2.png
  37. BIN
      img/game2/lin3.png
  38. BIN
      img/game2/successBgm.png
  39. BIN
      img/game3.png
  40. BIN
      img/game3/bgm.png
  41. BIN
      img/game3/icon1.png
  42. BIN
      img/game3/icon2.png
  43. BIN
      img/game3/icon3.png
  44. BIN
      img/game3/lin1.png
  45. BIN
      img/game3/lin2.png
  46. BIN
      img/game3/lin3.png
  47. BIN
      img/game3/successBgm.png
  48. BIN
      img/game4.png
  49. BIN
      img/game4/game4Bgm.png
  50. BIN
      img/game4/icon1.png
  51. BIN
      img/game4/icon2.png
  52. BIN
      img/game4/icon3.png
  53. BIN
      img/game4/lin1.png
  54. BIN
      img/game4/lin2.png
  55. BIN
      img/game4/lin3.png
  56. BIN
      img/game4/successBgm.png
  57. BIN
      img/game5.png
  58. BIN
      img/game5/bgm.png
  59. BIN
      img/game5/icon1.png
  60. BIN
      img/game5/icon2.png
  61. BIN
      img/game5/icon3.png
  62. BIN
      img/game5/lin1.png
  63. BIN
      img/game5/lin2.png
  64. BIN
      img/game5/lin3.png
  65. BIN
      img/game5/successBgm.png
  66. BIN
      img/guizeBgm.png
  67. BIN
      img/icon.png
  68. BIN
      img/img1.png
  69. BIN
      img/img2.png
  70. BIN
      img/loading.png
  71. BIN
      img/nextIcon.png
  72. BIN
      img/success.png
  73. BIN
      img/success/bgm.png
  74. BIN
      img/success/word.png
  75. BIN
      img/video/game4.mp4
  76. BIN
      img/video/game5.mp4
  77. 93
      index.html
  78. 47
      js/common.js
  79. 2
      js/jquery-1.8.3.min.js
  80. 47
      js/style.js
  81. 26
      success.html

28
.project

@ -0,0 +1,28 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>changzheng</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>com.aptana.ide.core.unifiedBuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>com.aptana.projects.webnature</nature>
</natures>
<filteredResources>
<filter>
<id>1624093352544</id>
<name></name>
<type>26</type>
<matcher>
<id>org.eclipse.ui.ide.multiFilter</id>
<arguments>1.0-name-matches-false-false-node_modules</arguments>
</matcher>
</filter>
</filteredResources>
</projectDescription>

162
begin.html

@ -0,0 +1,162 @@
<style type="text/css">
.beginIndex{
width: 100%;
height: 100%;
}
.beginIndex p.bgmImg {
width: 100%;
height: 100%;
}
.beginIndex p.bgmImg img {
width: 100%;
height: 100%;
}
.beginIndex .bgmImg{
width: 100%;
height: 100%;
}
.beginIndex .beginBtn img.btn {
position: absolute;
left: 50%;
transform: translateX(-50%);
bottom: 10%;
width: 3.44rem;
height: .83rem;
}
.guiz p.title{
position: absolute;
top: 15%;
right: 5%;
display: flex;
align-items: center;
}
.guiz p.title img{
width: .41rem;
height: .23rem;
}
.guiz p.title span{
color: #fff;
font-size: .26rem;
padding-left: .1rem;
}
/*遮罩*/
.mask{
display: none;
width: 100%;
height: 100%;
position: fixed;
top: 0;
left: 0;
background:url(img/begin.png) no-repeat;
background-size: 100% 100%;
filter: blur(.2rem);
}
/*活动规则*/
.guizBox{
display: none;
position: absolute;
left: 50%;
top: 50%;
transform: translate(-50%,-50%);
z-index: 9999;
}
p.close{
float: right;
width: .546rem;
height: .546rem;
}
p.close img{
width: 100%;
height: 100%;
}
.box_cont{
margin-top: .65rem;
background: url(img/guizeBgm.png) no-repeat;
background-size: 100% 100%;
width: 10.13rem;
height: 5.78rem;
overflow: hidden;
}
.box_cont ul{
width: 8.7rem;
margin: 1.5rem auto 0;
}
.box_cont li{
display: flex;
}
.box_cont li div.contText{
font-size: .28rem;
color: #1F444B;
width: 7.28rem;
line-height: .46rem;
}
.box_cont li p.tips{
color: #30584D;
font-size: .28rem;
font-weight: bold;
}
.box_cont li:nth-child(2){
margin-top: .35rem;
}
.box_cont li:nth-child(3){
margin-top: .4rem;
}
</style>
<div class="beginIndex">
<!--<p class="bgmImg"><img src="img/begin.png" /></p>-->
<!--游戏规则-->
<div class="guiz">
<p class="title">
<img src="img/icon.png"/> <span>查看游戏规则</span>
</p>
<div class="guizBox">
<p class="close"><img src="img/close.png"/></p>
<div class="box_cont">
<ul>
<li>
<p class="tips">活动时间:</p>
<div class="contText">
2021年X月X日 10:00 — 2021年X月X日 23:59
</div>
</li>
<li>
<p class="tips">活动规则:</p>
<div class="contText">
每一关均取自于长征中的经典故事,画面中隐藏着该故事中所包含的线索道具,集齐道具即可通关。每一关所需搜集的线索道具数量会在当前闯关界面进行提示。举例:《飞夺泸定桥》需要找到线索道具为“木板”。
</div>
</li>
<li>
<p class="tips">参与方式:</p>
<div class="contText">
用户可通过微信参与活动。
</div>
</li>
</ul>
</div>
</div>
</div>
<!--开始-->
<div class="beginBtn">
<img class="btn" src="img/beginBtn.png" />
</div>
<div class="mask"></div>
</div>
<script type="text/javascript">
$('.close').click(function(){
$('.mask').fadeOut();
$('.guizBox').fadeOut()
})
$('.title').click(function(){
$('.mask').fadeIn();
$('.guizBox').fadeIn()
})
$('.beginBtn').click(function(){
$('.begin').fadeOut(100)
$('.loading').fadeOut(100)
$('#game1').fadeIn(500)
})
</script>

206
css/game1.css

@ -0,0 +1,206 @@
.game1Index{
width: 100%;
height: 100%;
}
.game1Index p.bgm img{
width: 100%;
height: 100%;
}
.game1Index .imgList li{
width: 1.21rem;
height: 1.2rem;
background: url(../img/game1/kuang.png) no-repeat;
background-size: 100% 100%;
position: absolute;
left: 0;
top: 0;
}
.game1Index .imgList li img{
position: absolute;
z-index: 9999;
top: 50%;
left: 50%;
transform: translate(-50%,-50%);
}
.game1Index .imgList li:nth-child(1){
left: 1%;
}
.game1Index .imgList li:nth-child(2){
left: 11%;
}
.game1Index .imgList li:nth-child(3){
left: 21%;
}
.game1Index .clickIcon li{
width: 1rem;
height: 1rem;
position: absolute;
left: 0;
top: 0;
/*background: #000000;
opacity: .5;*/
}
.game1Index .clickIcon li.click1{
top: 40%;
left: 60%;
}
.game1Index .clickIcon li.click2{
top: 16%;
left: 46%;
width: .5rem;
height: .5rem;
}
.game1Index .clickIcon img{
width: .92rem;
display: none;
}
.game1Index .clickIcon li.click3{
top: 43%;
left: 15%;
width: 3rem;
height: 1.3rem;
transform: rotate(33deg);
}
/*书*/
.game1Index .maskBgm{
display: none;
width: 100%;
height: 100%;
position: absolute;
left: 0;
top: 0;
background: url(../img/game1/successBgm.png) no-repeat;
background-size: 100% 100%;
}
.game1Index .maskBgm:after {
content: "";
width: 100%;
height: 100%;
position: absolute;
left: 0;
top: 0;
background: inherit;
filter: blur(10px);
z-index: 2;
}
.game1Index .book_box{
display: none;
width: 100%;
height: 100%;
position: absolute;
left: 0;
top: 0;
z-index: 999;
}
.game1Index div.line{
position: absolute;
left: 0;
top: 50%;
transform: translateY(-50%);
background: rgba(61, 117, 122,.5);
width: 100%;
height: 1.66rem;
z-index:-1 ;
display: flex;
justify-content: space-between;
align-items: center;
}
.game1Index div.line p{
box-sizing: border-box;
padding: 0 1.15rem;
font-size: .44rem;
font-weight: 400;
color: #C9C6BA;
opacity: 0.41;
}
.game1Index div.closeIcon{
display: flex;
justify-content: flex-end;
margin-right: 1.2rem;
margin-top: .55rem;
}
.game1Index div.closeIcon img{
width: .546rem;
height: .546rem;
}
.game1Index .bookCont{
width: 9.93rem;
height: 5.89rem;
background: url(../img/bookBgm.png) no-repeat;
background-size: 100% 100%;
margin: 0 auto;
z-index: 999;
display: flex;
}
.game1Index .leftImg {
width: 3.58rem;
margin-left: .9rem;
}
.game1Index .leftImg .titleTip{
display: flex;
justify-content: space-between;
align-items: center;
margin-top: .42rem;
}
.game1Index .leftImg .titleTip p{
color: #1F444B;
font-size: .22rem;
}
.game1Index .leftImg .img{
width: 1.18rem;
height: .91rem;
}
.game1Index .leftImg .imgList{
width: 3.58rem;
height: 4.14rem;
margin-top: .1rem;
}
.game1Index .leftImg img{
width: 100%;
height: 100%;
}
.game1Index .rightCont{
width: 3.8rem;
margin-left: 1.05rem;
position: relative;
}
.game1Index .rightCont .titleTip{
display: flex;
margin-top: .7rem;
justify-content: space-between;
}
.game1Index .rightCont .titleTip h2,
.game1Index .rightCont .titleTip h5{
color: #1F444B;
font-size: .3rem;
}
.game1Index .rightCont .titleTip h5{
font-weight: normal;
font-size: .22rem;
}
.game1Index .rightCont ul{
margin-top: .12rem;
}
.game1Index .rightCont li{
font-size:.2rem ;
color: #1F444B;
line-height: .36rem;
}
.game1Index .rightCont .pageNum{
position: absolute;
bottom:5%;
left: 40%;
transform: translateX(-50%);
text-align: center;
font-size: .2rem;
color: #1F444B;
}

213
css/game2.css

@ -0,0 +1,213 @@
.game2Index {
width: 100%;
height: 100%;
}
.game2Index p.bgm img{
width: 100%;
height: 100%;
}
.game2Index .imgList li{
width: 1.21rem;
height: 1.2rem;
background: url(../img/game1/kuang.png) no-repeat;
background-size: 100% 100%;
position: absolute;
right: 0;
top: 0;
}
.game2Index .imgList li img{
position: absolute;
z-index: 9999;
top: 50%;
left: 50%;
transform: translate(-50%,-50%);
}
.game2Index .imgList li:nth-child(1){
right: 21%;
}
.game2Index .imgList li:nth-child(2){
right: 11%;
}
.game2Index .imgList li:nth-child(3){
right: 1%;
}
.game2Index .clickIcon li{
width: 1rem;
height: 1rem;
position: absolute;
right: 0;
top: 0;
}
.game2Index .clickIcon li.click1{
top: 6%;
right: 52%;
background-size: 100% 100%;
}
.game2Index .clickIcon li img{
width: .92rem;
display: none;
}
.game2Index .clickIcon li.click2{
top: 9%;
right:67%;
background-size: 100% 100%;
}
.game2Index .clickIcon li.click3{
top: 78%;
right: 67%;
/*background: #000000;
opacity: .5;*/
width: 4rem;
}
.game2Index .clickIcon li.click3 img{
width: .9rem;
position: absolute;
right: 7%;
top: 11%;
}
/*书*/
.game2Index .maskBgm{
display: none;
width: 100%;
height: 100%;
position: absolute;
left: 0;
top: 0;
background: url(../img/game2/successBgm.png) no-repeat;
background-size: 100% 100%;
}
.game2Index .maskBgm:after {
content: "";
width: 100%;
height: 100%;
position: absolute;
left: 0;
top: 0;
background: inherit;
filter: blur(10px);
z-index: 2;
}
.game2Index .book_box{
display: none;
width: 100%;
height: 100%;
position: absolute;
left: 0;
top: 0;
z-index: 999;
}
.game2Index div.line{
position: absolute;
left: 0;
top: 50%;
transform: translateY(-50%);
background: rgba(61, 117, 122,.5);
width: 100%;
height: 1.66rem;
z-index:-1 ;
display: flex;
justify-content: space-between;
align-items: center;
}
.game2Index div.line p{
box-sizing: border-box;
padding: 0 1.15rem;
font-size: .44rem;
font-weight: 400;
color: #C9C6BA;
opacity: 0.41;
}
.game2Index div.closeIcon{
display: flex;
justify-content: flex-end;
margin-right: 1.2rem;
margin-top: .55rem;
}
.game2Index div.closeIcon img{
width: .546rem;
height: .546rem;
}
.game2Index .bookCont{
width: 9.93rem;
height: 5.89rem;
background: url(../img/bookBgm.png) no-repeat;
background-size: 100% 100%;
margin: 0 auto;
z-index: 999;
display: flex;
}
.game2Index .leftImg {
width: 3.58rem;
margin-left: .9rem;
}
.game2Index .leftImg .titleTip{
display: flex;
justify-content: space-between;
align-items: center;
margin-top: .42rem;
}
.game2Index .leftImg .titleTip p{
color: #1F444B;
font-size: .22rem;
}
.game2Index .leftImg .img{
width: 1.18rem;
height: .91rem;
}
.game2Index .leftImg .imgList{
width: 3.58rem;
height: 4.14rem;
margin-top: .1rem;
}
.game2Index .leftImg img{
width: 100%;
height: 100%;
}
.game2Index .rightCont{
width: 3.8rem;
margin-left: 1.05rem;
position: relative;
}
.game2Index .rightCont .titleTip{
display: flex;
margin-top: .7rem;
justify-content: space-between;
}
.game2Index .rightCont .titleTip h2,
.game2Index .rightCont .titleTip h5{
color: #1F444B;
font-size: .3rem;
}
.game2Index .rightCont .titleTip h5{
font-weight: normal;
font-size: .22rem;
}
.game2Index .rightCont ul{
margin-top: .12rem;
}
.game2Index .rightCont li{
font-size:.2rem ;
color: #1F444B;
line-height: .36rem;
}
.game2Index .rightCont .pageNum{
position: absolute;
bottom:5%;
left: 40%;
transform: translateX(-50%);
text-align: center;
font-size: .2rem;
color: #1F444B;
}

201
css/game3.css

@ -0,0 +1,201 @@
.game3Index {
width: 100%;
height: 100%;
}
.game3Index p.bgm img{
width: 100%;
height: 100%;
}
.game3Index .imgList li{
width: 1.21rem;
height: 1.2rem;
background: url(../img/game1/kuang.png) no-repeat;
background-size: 100% 100%;
position: absolute;
left: 0;
top: 0;
}
.game3Index .imgList li img{
position: absolute;
z-index: 9999;
top: 50%;
left: 50%;
transform: translate(-50%,-50%);
}
.game3Index .imgList li:nth-child(1){
left: 1%;
}
.game3Index .imgList li:nth-child(2){
left: 11%;
}
.game3Index .imgList li:nth-child(3){
left: 21%;
}
.game3Index .clickIcon li{
width: .5rem;
height: 1rem;
position: absolute;
/*left: 0;
top: 0;*/
}
.game3Index .clickIcon li.click1{
top: 43%;
left: 66%;
}
.game3Index .clickIcon img{
width: .74rem;
display: none;
}
.game3Index .clickIcon li.click2{
bottom: 3%;
left: 82%;
}
.game3Index .clickIcon li.click3{
top: 45%;
left: 56%;
}
.game3Index .clickIcon li.click3 img{
width: .65rem;
}
/*书*/
.game3Index .maskBgm{
display: none;
width: 100%;
height: 100%;
position: absolute;
left: 0;
top: 0;
background: url(../img/game3/successBgm.png) no-repeat;
background-size: 100% 100%;
}
.game3Index .maskBgm:after {
content: "";
width: 100%;
height: 100%;
position: absolute;
left: 0;
top: 0;
background: inherit;
filter: blur(10px);
z-index: 2;
}
.game3Index .book_box{
display: none;
width: 100%;
height: 100%;
position: absolute;
left: 0;
top: 0;
z-index: 999;
}
.game3Index div.line{
position: absolute;
left: 0;
top: 50%;
transform: translateY(-50%);
background: rgba(61, 117, 122,.5);
width: 100%;
height: 1.66rem;
z-index:-1 ;
display: flex;
justify-content: space-between;
align-items: center;
}
.game3Index div.line p{
box-sizing: border-box;
padding: 0 1.15rem;
font-size: .44rem;
font-weight: 400;
color: #C9C6BA;
opacity: 0.41;
}
.game3Index div.closeIcon{
display: flex;
justify-content: flex-end;
margin-right: 1.2rem;
margin-top: .55rem;
}
.game3Index div.closeIcon img{
width: .546rem;
height: .546rem;
}
.game3Index .bookCont{
width: 9.93rem;
height: 5.89rem;
background: url(../img/bookBgm.png) no-repeat;
background-size: 100% 100%;
margin: 0 auto;
z-index: 999;
display: flex;
}
.game3Index .leftImg {
width: 3.58rem;
margin-left: .9rem;
}
.game3Index .leftImg .titleTip{
display: flex;
justify-content: space-between;
align-items: center;
margin-top: .42rem;
}
.game3Index .leftImg .titleTip p{
color: #1F444B;
font-size: .22rem;
}
.game3Index .leftImg .img{
width: 1.18rem;
height: .91rem;
}
.game3Index .leftImg .imgList{
width: 3.58rem;
height: 4.14rem;
margin-top: .1rem;
}
.game3Index .leftImg img{
width: 100%;
height: 100%;
}
.game3Index .rightCont{
width: 3.8rem;
margin-left: 1.05rem;
position: relative;
}
.game3Index .rightCont .titleTip{
display: flex;
margin-top: .7rem;
justify-content: space-between;
}
.game3Index .rightCont .titleTip h2,
.game3Index .rightCont .titleTip h5{
color: #1F444B;
font-size: .3rem;
}
.game3Index .rightCont .titleTip h5{
font-weight: normal;
font-size: .22rem;
}
.game3Index .rightCont ul{
margin-top: .12rem;
}
.game3Index .rightCont li{
font-size:.2rem ;
color: #1F444B;
line-height: .36rem;
}
.game3Index .rightCont .pageNum{
position: absolute;
bottom:5%;
left: 40%;
transform: translateX(-50%);
text-align: center;
font-size: .2rem;
color: #1F444B;
}

211
css/game4.css

@ -0,0 +1,211 @@
.game4Index {
width: 100%;
height: 100%;
}
.game4Index p.bgm img{
width: 100%;
height: 100%;
}
.game4Index .imgList li{
width: 1.21rem;
height: 1.2rem;
background: url(../img/game1/kuang.png) no-repeat;
background-size: 100% 100%;
position: absolute;
right: 0;
top: 0;
}
.game4Index .imgList li img{
position: absolute;
z-index: 9999;
top: 50%;
left: 50%;
transform: translate(-50%,-50%);
}
.game4Index .imgList li:nth-child(1){
right: 21%;
}
.game4Index .imgList li:nth-child(2){
right: 11%;
}
.game4Index .imgList li:nth-child(3){
right: 1%;
}
.game4Index .clickIcon li{
width: 1rem;
height: 1rem;
position: absolute;
/*background: #333;
opacity: .5;*/
}
.game4Index .clickIcon li.click1{
bottom: 3%;
right: 67%;
width: .5rem;
height: 1rem;
}
.game4Index .clickIcon li.click2{
top: 67%;
right: 52%;
width: 1rem;
height: 1.5rem;
}
.game4Index .clickIcon li.click3{
top: 53%;
right: 30%;
width: .5rem;
height: 1.5rem;
}
.game4Index .clickIcon li.click3 img{
width: .75rem;
}
.game4Index .clickIcon img{
width: .94rem;
display: none;
}
/*书*/
.game4Index .maskBgm{
display: none;
width: 100%;
height: 100%;
position: absolute;
left: 0;
top: 0;
background: url(../img/game2/successBgm.png) no-repeat;
background-size: 100% 100%;
}
.game4Index .maskBgm:after {
content: "";
width: 100%;
height: 100%;
position: absolute;
left: 0;
top: 0;
background: inherit;
filter: blur(10px);
z-index: 2;
}
.game4Index .book_box{
display: none;
width: 100%;
height: 100%;
position: absolute;
left: 0;
top: 0;
z-index: 999;
}
.game4Index div.line{
position: absolute;
left: 0;
top: 50%;
transform: translateY(-50%);
background: rgba(61, 117, 122,.5);
width: 100%;
height: 1.66rem;
z-index:-1 ;
display: flex;
justify-content: space-between;
align-items: center;
}
.game4Index div.line p{
box-sizing: border-box;
padding: 0 1.15rem;
font-size: .44rem;
font-weight: 400;
color: #C9C6BA;
opacity: 0.41;
}
.game4Index div.closeIcon{
display: flex;
justify-content: flex-end;
margin-right: 1.2rem;
margin-top: .55rem;
}
.game4Index div.closeIcon img{
width: .546rem;
height: .546rem;
}
.game4Index .bookCont{
width: 9.93rem;
height: 5.89rem;
background: url(../img/bookBgm.png) no-repeat;
background-size: 100% 100%;
margin: 0 auto;
z-index: 999;
display: flex;
}
.game4Index .leftImg {
width: 3.58rem;
margin-left: .9rem;
}
.game4Index .leftImg .titleTip{
display: flex;
justify-content: space-between;
align-items: center;
margin-top: .42rem;
}
.game4Index .leftImg .titleTip p{
color: #1F444B;
font-size: .22rem;
}
.game4Index .leftImg .img{
width: 1.18rem;
height: .91rem;
}
.game4Index .leftImg .imgList{
width: 3.58rem;
height: 4.14rem;
margin-top: .1rem;
}
.game4Index .leftImg img{
width: 100%;
height: 100%;
}
.game4Index .rightCont{
width: 3.8rem;
margin-left: 1.05rem;
position: relative;
}
.game4Index .rightCont .titleTip{
display: flex;
margin-top: .7rem;
justify-content: space-between;
}
.game4Index .rightCont .titleTip h2,
.game4Index .rightCont .titleTip h5{
color: #1F444B;
font-size: .3rem;
}
.game4Index .rightCont .titleTip h5{
font-weight: normal;
font-size: .22rem;
}
.game4Index .rightCont ul{
margin-top: 0.22rem;
margin-left: -.32rem;
}
.game4Index .rightCont li{
font-size:.2rem ;
color: #1F444B;
line-height: .36rem;
}
.game4Index .rightCont .pageNum{
position: absolute;
bottom:5%;
left: 40%;
transform: translateX(-50%);
text-align: center;
font-size: .2rem;
color: #1F444B;
}

208
css/game5.css

@ -0,0 +1,208 @@
.game5Index {
width: 100%;
height: 100%;
}
.game5Index p.bgm img{
width: 100%;
height: 100%;
}
.game5Index .imgList li{
width: 1.21rem;
height: 1.2rem;
background: url(../img/game1/kuang.png) no-repeat;
background-size: 100% 100%;
position: absolute;
right: 0;
top: 0;
}
.game5Index .imgList li img{
position: absolute;
z-index: 9999;
top: 50%;
left: 50%;
transform: translate(-50%,-50%);
}
.game5Index .imgList li:nth-child(1){
right: 21%;
}
.game5Index .imgList li:nth-child(2){
right: 11%;
}
.game5Index .imgList li:nth-child(3){
right: 1%;
}
.game5Index .clickIcon li{
width: 1rem;
height: 1rem;
position: absolute;
}
.game5Index .clickIcon li.click1{
bottom: 5%;
right: 31%;
width: 1.5rem;
height: 1rem;
}
.game5Index .clickIcon li.click2{
top: 23%;
right: 70%;
width: 1rem;
height: 1rem;
}
.game5Index .clickIcon li.click3{
top: 57%;
right: 84%;
width: 1rem;
height: 1rem;
}
.game5Index .clickIcon img{
width: .94rem;
display: none;
}
/*书*/
.game5Index .maskBgm{
display: none;
width: 100%;
height: 100%;
position: absolute;
left: 0;
top: 0;
background: url(../img/game5/successBgm.png) no-repeat;
background-size: 100% 100%;
}
.game5Index .maskBgm:after {
content: "";
width: 100%;
height: 100%;
position: absolute;
left: 0;
top: 0;
background: inherit;
filter: blur(10px);
z-index: 2;
}
.game5Index .book_box{
display: none;
width: 100%;
height: 100%;
position: absolute;
left: 0;
top: 0;
z-index: 999;
}
.game5Index div.line{
position: absolute;
left: 0;
top: 50%;
transform: translateY(-50%);
background: rgba(61, 117, 122,.5);
width: 100%;
height: 1.66rem;
z-index:-1 ;
display: flex;
justify-content: space-between;
align-items: center;
}
.game5Index div.line p{
box-sizing: border-box;
padding: 0 1.15rem;
font-size: .44rem;
font-weight: 400;
color: #C9C6BA;
opacity: 0.41;
}
.game5Index div.closeIcon{
display: flex;
justify-content: flex-end;
margin-right: 1.2rem;
margin-top: .55rem;
}
.game5Index div.closeIcon img{
width: .546rem;
height: .546rem;
}
.game5Index .bookCont{
width: 9.93rem;
height: 5.89rem;
background: url(../img/bookBgm.png) no-repeat;
background-size: 100% 100%;
margin: 0 auto;
z-index: 999;
display: flex;
}
.game5Index .leftImg {
width: 3.58rem;
margin-left: .9rem;
}
.game5Index .leftImg .titleTip{
display: flex;
justify-content: space-between;
align-items: center;
margin-top: .42rem;
}
.game5Index .leftImg .titleTip p{
color: #1F444B;
font-size: .22rem;
}
.game5Index .leftImg .img{
width: 1.18rem;
height: .91rem;
}
.game5Index .leftImg .imgList{
width: 3.58rem;
height: 4.14rem;
margin-top: .1rem;
}
.game5Index .leftImg img{
width: 100%;
height: 100%;
}
.game5Index .rightCont{
width: 3.8rem;
margin-left: 1.05rem;
position: relative;
}
.game5Index .rightCont .titleTip{
display: flex;
margin-top: .7rem;
justify-content: space-between;
}
.game5Index .rightCont .titleTip h2,
.game5Index .rightCont .titleTip h5{
color: #1F444B;
font-size: .3rem;
}
.game5Index .rightCont .titleTip h5{
font-weight: normal;
font-size: .22rem;
}
.game5Index .rightCont ul{
margin-top: 0.22rem;
margin-left: -.32rem;
}
.game5Index .rightCont li{
font-size:.2rem ;
color: #1F444B;
line-height: .36rem;
}
.game5Index .rightCont .pageNum{
position: absolute;
bottom:5%;
left: 40%;
transform: translateX(-50%);
text-align: center;
font-size: .2rem;
color: #1F444B;
}

223
css/index.css

@ -0,0 +1,223 @@
.loading {
width: 100%;
height: 100%;
}
.loading img {
width: 100%;
height: 100%;
}
/*进度条*/
.flex-center {
display: flex;
flex-direction: column;
align-items: center;
position: absolute;
left: 50%;
transform: translateX(-50%);
bottom: 10%;
}
.flex-center h3{
font-size: .3rem;
color: #163E49;
margin-bottom: .1rem;
}
.container {
display: inline-block;
width: 8.09rem;
height: .23rem;
background: #3B7686;
border: 2px solid #FFFFFF;
box-shadow: 0px 0px 9px 0px rgba(0, 0, 0, 0.35);
border-radius: 11px;
position: relative;
}
.h-100P {
height: 100%;
position: absolute;
left: 0;
bottom: 0;
}
span.h-100P text {
display: inline-block;
width: .29rem;
height: .29rem;
border-radius: .29rem;
background: #FFE54A;
position: absolute;
margin-left: -.28rem;
margin-top: -.02rem;
border: 1px solid #fff;
z-index: 9999;
}
.bar {
display: inline-block;
background: #FFE54A;
color: white;
font-weight: bold;
/*padding: 0 5px;*/
text-align: right;
border-radius: 5px;
border-right: 1px solid #999;
}
.bar:after {
content: "";
position: absolute;
top: 0;
left: 0;
bottom: 0;
right: 0;
background-image: -webkit-gradient(linear, 0 0, 100% 100%, color-stop(.25, rgba(255, 186, 0, 1)), color-stop(.25, transparent), color-stop(.5, transparent), color-stop(.5, rgba(255, 186, 0, 1)), color-stop(.75, rgba(255, 186, 0, 1)), color-stop(.75, transparent), to(transparent));
background-image: -moz-linear-gradient( -45deg, rgba(255, 186, 0, 1) 25%, transparent 25%, transparent 50%, rgba(255, 186, 0, 1) 50%, rgba(255, 186, 0, 1) 75%, transparent 75%, transparent);
z-index: 1;
-webkit-background-size: 50px 50px;
-moz-background-size: 50px 50px;
background-size: 50px 50px;
-webkit-animation: move 2s linear infinite;
-moz-animation: move 2s linear infinite;
-webkit-border-top-right-radius: 8px;
-webkit-border-bottom-right-radius: 8px;
-moz-border-radius-topright: 8px;
-moz-border-radius-bottomright: 8px;
border-top-right-radius: 8px;
border-bottom-right-radius: 8px;
-webkit-border-top-left-radius: 20px;
-webkit-border-bottom-left-radius: 20px;
-moz-border-radius-topleft: 20px;
-moz-border-radius-bottomleft: 20px;
border-top-left-radius: 20px;
border-bottom-left-radius: 20px;
overflow: hidden;
}
/*进度条 end*/
.loading {
display: block;
}
.begin {
display: none;
}
#game1 {
display: none;
}
.secondGame,
#game2 {
width: 100%;
height: 100%;
}
.begin,
.firstGame,
.thirdGame,
.fourGame,
.fiveGame,
.win,
#begin,
#game1,
#game3,
#game4,
#game5,
#success {
width: 100%;
height: 100%;
}
p.bgm {
width: 100%;
height: 100%;
}
/*开始游戏页*/
/*
#game2{
display:none ;
}
#game3{
display: none;
}
#game4{
display: none;
}
#game5{
display: none;
}
#success{
display: none;
}*/
/*成功*/
.successBox {
position: absolute;
left: 50%;
top: 50%;
transform: translate(-50%, -50%);
width: 9.53rem;
height: 5.83rem;
background: url(../img/success.png) no-repeat;
background-size: 100% 100%;
/*display: flex;*/
justify-content: center;
align-items: flex-end;
display: none;
z-index: 99;
}
.successBox p {
width: 2.54rem;
height: .84rem;
margin-bottom: 1.09rem;
}
.successBox p img {
width: 100%;
height: 100%;
}
.successBox div.shut {
position: absolute;
top: 1%;
right: 10%;
width: .546rem;
height: .546rem;
}
.successBox div.shut img {
width: 100%;
height: 100%;
}
/*.clickIcon li{
background: #000000;
opacity: .5;
}*/
.imgList li p{
/*width: 1.21rem;
height: 1.2rem;
position: absolute;
left: 0;
top: 0;
background: rgba(0,0,0,.5);
z-index: 999999;
border-radius: 5px;*/
}

12
css/style.css

@ -0,0 +1,12 @@
*{
margin: 0;
padding: 0;
}
ul,li{
list-style: none;
}
a{
text-decoration: none;
font-size: .15rem;
color: #333;
}

180
game1.html

@ -0,0 +1,180 @@
<link rel="stylesheet" type="text/css" href="css/game1.css" />
<div class="game1Index">
<p class="bgm"><img src="img/game1/bgm.png" /></p>
<div class="box_wrap">
<ul class="imgList">
<li><img style="width: .96rem;" src="img/game1/lin1.png" />
<p></p>
</li>
<li><img style="width: .92rem;" src="img/game1/lin2.png" />
<p></p>
</li>
<li><img style="width: .94rem;" src="img/game1/lin3.png" />
<p></p>
</li>
<!--<li></li>
<li></li>
<li></li>-->
</ul>
<div class="clickIcon">
<ul>
<li class="click1 click"><img src="img/game1/icon1.png"/></li>
<li class="click2 click"><img src="img/game1/icon2.png"/></li>
<li class="click3 click"><img src="img/game1/icon3.png" /></li>
</ul>
</div>
</div>
<div class="book_box">
<div class="line">
<p class="leftIcon">
< </p>
<p class="rightIcon"> > </p>
</div>
<div class="closeIcon"><img src="img/close.png" /></div>
<div class="bookCont">
<div class="leftImg">
<div class="titleTip">
<p>强渡乌江</p>
<p class="img"><img src="img/img2.png" /></p>
</div>
<div class="imgList">
<img src="img/img1.png" />
</div>
</div>
<div class="rightCont">
<div class="titleTip">
<h2>故事原型</h2>
<h5>强渡乌江</h5>
</div>
<ul class="textList">
<!--<li>飞夺泸定桥:1935年5月,北上抗日的红军向天险大渡河挺进。大渡河水流湍急,两岸都是高山峻岭,只有一座铁索桥可以通过。这座铁索桥,就是红军北上必须夺取的泸定桥。国民党反动派派了两个团防守泸定桥,阻拦红军北上;后来又调了两个旅赶去增援,妄想把我红军消灭在桥头上。我军早就看穿了敌人的诡计。28日早上,红四团接到上级命令:“29日早晨夺下泸定桥!”时间只剩下20多个小时了</li>
<li>红四团离泸定桥还有240里。敌人的两个旅援兵正在对岸向泸定桥行进。抢在敌人前头,是我军战胜敌人的关键。红四团翻山越岭,沿路击溃了好几股阻击的敌人,到晚上7点钟,离泸定桥还有110里。战士们一整天没顾得上吃饭。天又下起雨来,把他们都淋透了。战胜敌人的决心使他们忘记了饥饿和疲劳。在漆黑的夜里,他们冒着雨,踩着泥水继续前进。忽然对岸出现了无数火把,像一条长蛇向泸定桥的</li>
<li>方向奔去,分明是敌人的增援部队。红四团的战士索性也点起火把,照亮了道路跟对岸的敌人赛跑。敌人看到了这边的火把,扯着嗓子喊:“你们是哪个部分的?”我们的战士高声答话:“是碰上红军撤下来的。”对岸的敌人并不疑心。两支军队像两条火龙,隔着大渡河走了二三十里。雨越下越猛,像瓢泼一样,把两岸的火把都浇灭了。对岸的敌人不能再走,只好停下来宿营。红四团仍旧摸黑冒雨前进,终于在</li>
<li>29日清晨赶到了泸定桥,把增援的两个旅的敌人抛在后面了。</li>-->
</ul>
<p class="pageNum"><text>1</text>/<span>5</span></p>
</div>
</div>
</div>
<div class="maskBgm"></div>
<!--下一关-->
<div class="successBox">
<!--<div class="shut"><img src="img/close.png" /></div>-->
<p class="above"><img src="img/aboveIcon.png" /></p>
<p class="next game1Next"><img src="img/nextIcon.png" /></p>
</div>
</div>
<script type="text/javascript">
var num = 0;
var leftArr = ['2%', '12%', '22%'];
var contList = [
'1935年1月,按照猴场会议作出的决定,红军开始向黔北地区挺近。而此时,横亘在他们面前的,是被称为“天险”的千里乌江和黔军的严密布防,身后是国民党的中央军步步紧逼。过不过得了乌江,关系红军存亡。1月1号到2号,抢渡乌江的战斗,在江界河渡口、龙溪回龙场渡口和茶山关渡口3个地方打响。由于江边所有的渡船和整块的木板都已经被敌军搜走,负责抢渡江界河渡口的红一军团第二师只能组织大家赶制竹筏渡江。',
'但敌军火力猛烈,一天之内的两次渡江都失败了。其中一条竹筏上的5名指战员失踪。眼看突出重围的时间越来越紧迫。3号上午,红军二师决定在渡口上游实行强渡。但让第一批渡江的3只竹筏上的战士感到奇怪的是,就在他们即将冲上对岸时,敌军突然不向他们开枪了,纷纷转向了阵地后方。原来,头一天晚上失踪的5名红军指战员在夜色的掩护下摸到了敌人阵地身后,这时候突然杀了出来,配合主力渡江。',
'出其不意的攻击,为渡江部队创造了宝贵的机会,很快,一个营的红军迅速渡江,抢占了高地。经过激烈的战斗,红军终于完全控制了乌江北岸,搭起了浮桥,中央红军大部队开始陆续过江。与此同时,右路纵队的红一军团主力和红九军团在龙溪回龙场渡口,左路纵队的红三军团在茶山关渡口组织的强渡也都取得了成功。把国民党军甩在了乌江以东和以南地区。突破乌江战役是红军长征以来取得的第一个较大胜利,',
'大大鼓舞了红军的战斗意志,一扫长征以来的被动局面,红军开始把战争的主动权掌握在自己手里。(来源:贵州网络广播电视台)',
]
var liCont = '';
var pageNum = 1;
var total = contList.length
for(var i = 0; i <= contList.length; i++) {
liCont += '<li>' + contList[i] + '</i>'
}
$('.game1Index .textList').html(liCont)
$('.game1Index .textList li').eq(0).show().siblings().hide()
$('.game1Index .pageNum span').text(total)
$('.game1Index .pageNum text').text(pageNum)
$('.game1Index .leftIcon').click(function() {
if(pageNum > 1) {
pageNum--;
$('.game1Index .pageNum text').text(pageNum)
$('.game1Index .textList li').eq(pageNum - 1).show().siblings().hide()
}
})
$('.game1Index .rightIcon').click(function() {
if(pageNum < total) {
pageNum++;
$('.game1Index .pageNum text').text(pageNum)
$('.game1Index .textList li').eq(pageNum - 1).show().siblings().hide()
}
if(pageNum == total) {
setTimeout(function() {
$('.game1Index .book_box').fadeOut()
$('.game1Index .successBox').css('display', 'flex')
}, 1500)
}
})
$('.game1Index .click1').click(function() {
$('.game1Index .click1 img').css('display','block')
$('.game1Index .click1').animate({
'top': '3.5%',
"left": '2%',
'transform': 'translate(-50%,-50%)'
}, 1000)
// setTimeout(function() {
// $('.game1Index .click1').css('opacity', '0')
// }, 1000)
$('.game1Index .imgList li').eq(0).find('img').fadeOut(1500)
num++;
success();
})
$('.game1Index .click2').click(function() {
$('.game1Index .click2 img').css('display','block')
$('.game1Index .click2').animate({
'top': '4%',
"left": '12%',
'transform': 'translate(-50%,-50%)'
}, 1000)
// setTimeout(function() {
// $('.game1Index .click2').css('opacity', '0')
// }, 1000)
$('.game1Index .imgList li').eq(1).find('img').fadeOut(1500)
num++;
success();
})
$('.game1Index .click3').click(function() {
$('.game1Index .click3 img').css('display','block')
$('.game1Index .click3').animate({
'top': '10%',
"left": '19%',
'transform': 'translate(-50%,-50%)',
}, 1000)
// setTimeout(function() {
// $('.game1Index .click3').css('opacity', '0')
// }, 1000)
$('.game1Index .imgList li').eq(2).find('img').fadeOut(1500)
num++;
success();
})
$('.game1Index .closeIcon').click(function() {
$('.game1Index .book_box').fadeOut()
$('.game1Index .successBox').css('display', 'flex')
})
function success() {
if(num == 3) {
console.log('成功')
setTimeout(function() {
$('.game1Index p.bgm img').attr('src', 'img/game1/successBgm.png')
$('.game1Index .box_wrap').fadeOut();
}, 1500)
setTimeout(function() {
$('.game1Index .book_box').fadeIn()
$('.game1Index .maskBgm').fadeIn()
}, 2500)
}
}
$('.game1Next').click(function(){
$('.firstGame').css({'width':'0','height':'0'})
$('#game1').css({'width':'0','height':'0'})
$('.game1Index').remove();
$('#game2').load('game2.html')
$('.secondGame').css({'width':'100%','height':'100%'})
$('#game2').css({'width':'100%','height':'100%'})
})
</script>

187
game2.html

@ -0,0 +1,187 @@
<link rel="stylesheet" type="text/css" href="css/game2.css" />
<div class="game2Index">
<p class="bgm"><img src="img/game2/game2Bgm.png" /></p>
<div class="box_wrap">
<ul class="imgList">
<li><img style="width: .96rem;" src="img/game2/lin1.png" />
<p></p>
</li>
<li><img style="width: .92rem;" src="img/game2/lin2.png" />
<p></p>
</li>
<li><img style="width: .94rem;" src="img/game2/lin3.png" />
<p></p>
</li>
<!--<li></li>
<li></li>
<li></li>-->
</ul>
<div class="clickIcon">
<ul>
<li class="click1 click"><img src="img/game2/icon1.png" /></li>
<li class="click2 click"><img src="img/game2/icon2.png" /></li>
<li class="click3 click"><img src="img/game2/icon3.png" /></li>
</ul>
</div>
</div>
<div class="book_box">
<div class="line">
<p class="leftIcon">
< </p>
<p class="rightIcon"> > </p>
</div>
<div class="closeIcon"><img src="img/close.png" /></div>
<div class="bookCont">
<div class="leftImg">
<div class="titleTip">
<p>飞夺泸定桥</p>
<p class="img"><img src="img/game2.png" /></p>
</div>
<div class="imgList">
<img src="img/img1.png" />
</div>
</div>
<div class="rightCont">
<div class="titleTip">
<h2>故事原型</h2>
<h5>飞夺泸定桥</h5>
</div>
<ul class="textList">
<!--<li>飞夺泸定桥:1935年5月,北上抗日的红军向天险大渡河挺进。大渡河水流湍急,两岸都是高山峻岭,只有一座铁索桥可以通过。这座铁索桥,就是红军北上必须夺取的泸定桥。国民党反动派派了两个团防守泸定桥,阻拦红军北上;后来又调了两个旅赶去增援,妄想把我红军消灭在桥头上。我军早就看穿了敌人的诡计。28日早上,红四团接到上级命令:“29日早晨夺下泸定桥!”时间只剩下20多个小时了</li>
<li>红四团离泸定桥还有240里。敌人的两个旅援兵正在对岸向泸定桥行进。抢在敌人前头,是我军战胜敌人的关键。红四团翻山越岭,沿路击溃了好几股阻击的敌人,到晚上7点钟,离泸定桥还有110里。战士们一整天没顾得上吃饭。天又下起雨来,把他们都淋透了。战胜敌人的决心使他们忘记了饥饿和疲劳。在漆黑的夜里,他们冒着雨,踩着泥水继续前进。忽然对岸出现了无数火把,像一条长蛇向泸定桥的</li>
<li>方向奔去,分明是敌人的增援部队。红四团的战士索性也点起火把,照亮了道路跟对岸的敌人赛跑。敌人看到了这边的火把,扯着嗓子喊:“你们是哪个部分的?”我们的战士高声答话:“是碰上红军撤下来的。”对岸的敌人并不疑心。两支军队像两条火龙,隔着大渡河走了二三十里。雨越下越猛,像瓢泼一样,把两岸的火把都浇灭了。对岸的敌人不能再走,只好停下来宿营。红四团仍旧摸黑冒雨前进,终于在</li>
<li>29日清晨赶到了泸定桥,把增援的两个旅的敌人抛在后面了。</li>-->
</ul>
<p class="pageNum"><text>1</text>/<span>5</span></p>
</div>
</div>
</div>
<div class="maskBgm"></div>
<!--下一关-->
<div class="successBox">
<!--<div class="shut"><img src="img/close.png" /></div>-->
<p class="above game2Above"><img src="img/aboveIcon.png" /></p>
<p class="next game2Next"><img src="img/nextIcon.png" /></p>
</div>
</div>
<script type="text/javascript">
var num2 = 0;
var contList2 = [
'1935年5月,北上抗日的红军向天险大渡河挺进。大渡河水流湍急,两岸都是高山峻岭,只有一座铁索桥可以通过。这座铁索桥,就是红军北上必须夺取的泸定桥。国民党反动派派了两个团防守泸定桥,阻拦红军北上;后来又调了两个旅赶去增援,妄想把我红军消灭在桥头上。我军早就看穿了敌人的诡计。28日早上,红四团接到上级命令:“29日早晨夺下泸定桥!”时间只剩下20多个小时了,红四团离泸定桥还有240里。',
'敌人的两个旅援兵正在对岸向泸定桥行进。抢在敌人前头,是我军战胜敌人的关键。红四团翻山越岭,沿路击溃了好几股阻击的敌人,到晚上7点钟,离泸定桥还有110里。战士们一整天没顾得上吃饭。天又下起雨来,把他们都淋透了。战胜敌人的决心使他们忘记了饥饿和疲劳。在漆黑的夜里,他们冒着雨,踩着泥水继续前进。忽然对岸出现了无数火把,像一条长蛇向泸定桥的方向奔去,分明是敌人的增援部队。',
'红四团的战士索性也点起火把,照亮了道路跟对岸的敌人赛跑。敌人看到了这边的火把,扯着嗓子喊:“你们是哪个部分的?”我们的战士高声答话:“是碰上红军撤下来的。”对岸的敌人并不疑心。两支军队像两条火龙,隔着大渡河走了二三十里。雨越下越猛,像瓢泼一样,把两岸的火把都浇灭了。对岸的敌人不能再走,只好停下来宿营。红四团仍旧摸黑冒雨前进,终于在29日清晨赶到了泸定桥,把增援的两个旅的敌人抛在后面了。',
'泸定桥离水面有好几丈高,是由13根铁链组成的:两边各有两根,算是桥栏;底下并排9根,铺上木板,就是桥面。人走在桥上摇摇晃晃,就像荡秋千似的。现在连木板也被敌人抽掉了,只剩下铁链。向桥下一看,真叫人心惊胆寒,红褐色的河水像瀑布一样,从上游的山峡里直泻下来,撞击在岩石上,溅起一丈多高的浪花,涛声震耳欲聋。桥对岸的泸定桥背靠着山,西门正对着桥头。守城的两个团的敌人早已在城墙和山坡上筑好工事,凭着天险,疯狂地向红军喊叫:“来吧,看你们飞过来吧!”',
'红四团马上发起总攻。团长和政委亲自站在桥头上指挥战斗。号手们吹起冲锋号,所有武器一齐开火,枪炮声,喊杀声,霎时间震动山谷。二连担任突击队,22位英雄拿着短枪,背着马刀,带着手榴弹,冒着敌人密集的枪弹,攀着铁链向对岸冲去。跟在他们后面的是三连,战士们除了武器,每人带一块木板,一边前进一边铺桥。突击队刚刚冲到对岸,敌人就放起火来,桥头立刻被大火包围了。在这千钧一发的时刻,传来了团长和政委的喊声:“同志们!为了党的事业,为了最后的胜利,冲呀!”',
'英雄们听到党的号召,更加奋不顾身,都箭一般地穿过熊熊大火,冲进城去,和城里的敌人展开了激烈的搏斗。激战了两个小时,守城的敌人被消灭了大半,其余的都狼狈地逃跑了。红四团英勇地夺下了泸定桥,取得了长征中的又一次决定性的胜利。红军的主力渡过了天险大渡河,浩浩荡荡地奔赴抗日的最前线。(来源:北师大版第七册课文)'
]
var liCont2 = '';
var pageNum2 = 1;
var total2 = contList2.length
for(var i = 0; i <= contList2.length; i++) {
liCont2 += '<li>' + contList2[i] + '</i>'
}
$('.game2Index .textList').html(liCont2)
$('.game2Index .textList li').eq(0).show().siblings().hide()
$('.game2Index .pageNum span').text(total2)
$('.game2Index .pageNum text').text(pageNum2)
$('.game2Index .leftIcon').click(function() {
if(pageNum2 > 1) {
pageNum2--;
$('.pageNum text').text(pageNum2)
$('.textList li').eq(pageNum2 - 1).show().siblings().hide()
}
})
$('.game2Index .rightIcon').click(function() {
if(pageNum2 < total2) {
pageNum2++;
$('.game2Index .pageNum text').text(pageNum2)
$('.game2Index .textList li').eq(pageNum2 - 1).show().siblings().hide()
}
if(pageNum2 == total2) {
setTimeout(function() {
$('.game2Index .book_box').fadeOut()
$('.game2Index .successBox').css('display', 'flex')
}, 1500)
}
})
$('.game2Index .click1').click(function() {
$('.game2Index .click1 img').css('display','block')
$('.game2Index .click1').animate({
'top': '0.5%',
"right": '21%',
'transform': 'translate(-50%,-50%)'
}, 1000)
// setTimeout(function() {
// $('.game2Index .click1').css('opacity', '0')
// }, 1000)
$('.game2Index .imgList li').eq(0).find('img').fadeOut(1500)
num2++;
success2();
})
$('.game2Index .click2').click(function() {
$('.game2Index .click2 img').css('display','block')
$('.game2Index .click2').animate({
'top': '4%',
"right": '12%',
'transform': 'translate(-50%,-50%)'
}, 1000)
// setTimeout(function() {
// $('.game2Index .click2').css('opacity', '0')
// }, 1000)
$('.game2Index .imgList li').eq(1).find('img').fadeOut(1500)
num2++;
success2();
})
$('.game2Index .click3').click(function() {
$('.game2Index .click3 img').css('display','block')
$('.game2Index .click3').animate({
'top': '4%',
"right": '0%',
'transform': 'translate(-50%,-50%)',
}, 1000)
// setTimeout(function() {
// $('.game2Index .click3').css('opacity', '0')
// }, 1000)
$('.game2Index .imgList li').eq(2).find('img').fadeOut(1500)
num2++;
success2();
})
$('.game2Index .closeIcon').click(function() {
$('.game2Index .book_box').fadeOut()
$('.game2Index .successBox').css('display', 'flex')
})
function success2() {
if(num2 == 3) {
console.log('成功')
setTimeout(function() {
$('.game2Index p.bgm img').attr('src', 'img/game2/successBgm.png')
$('.game2Index .box_wrap').fadeOut();
}, 1500)
setTimeout(function() {
$('.game2Index .book_box').fadeIn()
$('.game2Index .maskBgm').fadeIn()
}, 2500)
}
}
$('.game2Above').click(function(){
$('.firstGame').css({'width':'100%','height':'100%'})
$('#game1').css({'width':'100%','height':'100%'})
$('.secondGame').css({'width':'0','height':'0'})
$('#game2').css({'width':'0','height':'0'})
$('#game1').load("game1.html")
$('.game2Index').remove();
})
$('.game2Next').click(function(){
$('.game2Index').remove();
$('#game3').load('game3.html');
$('.secondGame').css({'width':'0','height':'0'})
$('#game2').css({'width':'0','height':'0'})
$('.thirdGame').css({'width':'100%','height':'100%'})
$('#game3').css({'width':'100%','height':'100%'})
})
</script>

187
game3.html

@ -0,0 +1,187 @@
<link rel="stylesheet" type="text/css" href="css/game3.css" />
<div class="game3Index">
<p class="bgm"><img src="img/game3/bgm.png" /></p>
<div class="box_wrap">
<ul class="imgList">
<li><img style="width: .66rem;" src="img/game3/lin1.png" />
<p></p>
</li>
<li><img style="width: .74rem;" src="img/game3/lin2.png" />
<p></p>
</li>
<li><img style="width: .6rem;" src="img/game3/lin3.png" />
<p></p>
</li>
<!--<li></li>
<li></li>
<li></li>-->
</ul>
<div class="clickIcon">
<ul>
<li class="click1 click"><img src="img/game3/icon1.png"/></li>
<li class="click2 click"><img src="img/game3/icon2.png"/></li>
<li class="click3 click"><img src="img/game3/icon3.png"/></li>
</ul>
</div>
</div>
<div class="book_box">
<div class="line">
<p class="leftIcon">
< </p>
<p class="rightIcon"> > </p>
</div>
<div class="closeIcon"><img src="img/close.png" /></div>
<div class="bookCont">
<div class="leftImg">
<div class="titleTip">
<p>金色的鱼钩</p>
<p class="img"><img src="img/game3.png" /></p>
</div>
<div class="imgList">
<img src="img/img1.png" />
</div>
</div>
<div class="rightCont">
<div class="titleTip">
<h2>故事原型</h2>
<h5>金色的鱼钩</h5>
</div>
<ul class="textList">
<!--<li>飞夺泸定桥:1935年5月,北上抗日的红军向天险大渡河挺进。大渡河水流湍急,两岸都是高山峻岭,只有一座铁索桥可以通过。这座铁索桥,就是红军北上必须夺取的泸定桥。国民党反动派派了两个团防守泸定桥,阻拦红军北上;后来又调了两个旅赶去增援,妄想把我红军消灭在桥头上。我军早就看穿了敌人的诡计。28日早上,红四团接到上级命令:“29日早晨夺下泸定桥!”时间只剩下20多个小时了</li>
<li>红四团离泸定桥还有240里。敌人的两个旅援兵正在对岸向泸定桥行进。抢在敌人前头,是我军战胜敌人的关键。红四团翻山越岭,沿路击溃了好几股阻击的敌人,到晚上7点钟,离泸定桥还有110里。战士们一整天没顾得上吃饭。天又下起雨来,把他们都淋透了。战胜敌人的决心使他们忘记了饥饿和疲劳。在漆黑的夜里,他们冒着雨,踩着泥水继续前进。忽然对岸出现了无数火把,像一条长蛇向泸定桥的</li>
<li>方向奔去,分明是敌人的增援部队。红四团的战士索性也点起火把,照亮了道路跟对岸的敌人赛跑。敌人看到了这边的火把,扯着嗓子喊:“你们是哪个部分的?”我们的战士高声答话:“是碰上红军撤下来的。”对岸的敌人并不疑心。两支军队像两条火龙,隔着大渡河走了二三十里。雨越下越猛,像瓢泼一样,把两岸的火把都浇灭了。对岸的敌人不能再走,只好停下来宿营。红四团仍旧摸黑冒雨前进,终于在</li>
<li>29日清晨赶到了泸定桥,把增援的两个旅的敌人抛在后面了。</li>-->
</ul>
<p class="pageNum"><text>1</text>/<span>5</span></p>
</div>
</div>
</div>
<div class="maskBgm"></div>
<!--下一关-->
<div class="successBox">
<!--<div class="shut"><img src="img/close.png" /></div>-->
<p class="above game3Above"><img src="img/aboveIcon.png" /></p>
<p class="next game3Next"><img src="img/nextIcon.png" /></p>
</div>
</div>
<script type="text/javascript">
var num3 = 0;
var leftArr3 = ['2%', '12%', '22%'];
var contList3 = [
'1935年,在红军过草地时,指导员让老炊事班长照顾我们几个得胃病的同志走出草地。我们几个同志走不快,一天只能走二十里来路,很快就没了食物。有一次,老班长在水塘边洗衣服时,发现了几条鱼,老班长做了一个鱼钩把鱼钓了上来做给我们几个同志吃。我见老班长没吃鱼,他却说吃过了,我不信。于是等到他收拾完碗筷走后就悄悄跟着他,一看,只见老班长在吃我们几个吃剩的鱼骨头,嚼草根,艰难地硬咽下去,',
'我失声喊起来,老班长把党的秘密告诉我,让我不要告诉别的同志。第二天在吃鱼汤时,我们几个小同志怎么也吃不下,老班长鼓励我们要面对事实,为了革命要坚持。后来在老班长的鼓励下我们走到了草地的边际。可是就在这天上午,老班长在水塘边奄奄一息了,老班长说让我们把鱼吃了,一口气走出草地。最后老班长牺牲了。我一定要把金色的鱼钩送到革命烈士纪念馆去,让我们子子孙孙来瞻仰它。(缩写自《金色的鱼钩》)'
]
var liCont3 = '';
var pageNum3 = 1;
var total3 = contList3.length
for(var i = 0; i < contList3.length; i++) {
liCont3 += '<li>' + contList3[i] + '</i>'
}
$('.game3Index .textList').html(liCont3)
$('.game3Index .textList li').eq(0).show().siblings().hide()
$('.game3Index .pageNum span').text(total3)
$('.game3Index .pageNum text').text(pageNum3)
$('.game3Index .leftIcon').click(function() {
if(pageNum3 > 1) {
pageNum3--;
$('.game3Index .pageNum text').text(pageNum3)
$('.game3Index .textList li').eq(pageNum3 - 1).show().siblings().hide()
}
})
$('.game3Index .rightIcon').click(function() {
if(pageNum3 < total3) {
pageNum3++;
$('.game3Index .pageNum text').text(pageNum3)
$('.game3Index .textList li').eq(pageNum3 - 1).show().siblings().hide()
}
if(pageNum3 == total3) {
console.log('第三')
setTimeout(function() {
$('.game3Index .book_box').fadeOut()
$('.game3Index .successBox').css('display', 'flex')
}, 1500)
}
})
$('.game3Index .click1').click(function() {
$('.game3Index .click1 img').css('display','block')
$('.game3Index .click1').animate({
'top': '2.5%',
"left": '3%',
'transform': 'translate(-50%,-50%)'
}, 1000)
// setTimeout(function() {
// $('.game3Index .click1').css('opacity', '0')
// }, 1000)
$('.game3Index .imgList li').eq(0).find('img').fadeOut(1500)
num3++;
success3();
})
$('.game3Index .click2').click(function() {
$('.game3Index .click2 img').css('display','block')
$('.game3Index .click2').animate({
'top': '4%',
"left": '13%',
'transform': 'translate(-50%,-50%)',
}, 1000)
// setTimeout(function() {
// $('.game3Index .click2').css('opacity', '0')
// }, 1000)
$('.game3Index .imgList li').eq(1).find('img').fadeOut(1500)
num3++;
success3();
})
$('.game3Index .click3').click(function() {
$('.game3Index .click3 img').css('display','block')
$('.game3Index .click3').animate({
'top': '2%',
"left": '23%',
'transform': 'translate(-50%,-50%)',
}, 1000)
// setTimeout(function() {
// $('.game3Index .click3').css('opacity', '0')
// }, 1000)
$('.game3Index .imgList li').eq(2).find('img').fadeOut(1500)
num3++;
success3();
})
$('.game3Index .closeIcon').click(function() {
$('.game3Index .book_box').fadeOut()
$('.game3Index .successBox').css('display', 'flex')
})
function success3() {
if(num3 == 3) {
console.log('成功')
setTimeout(function() {
$('.game3Index p.bgm img').attr('src', 'img/game3/successBgm.png')
$('.game3Index .box_wrap').fadeOut();
}, 1500)
setTimeout(function() {
$('.game3Index .book_box').fadeIn()
$('.game3Index .maskBgm').fadeIn()
}, 2500)
}
}
$('.game3Above').click(function(){
$('#game2').load('game2.html');
$('.game3Index').remove();
$('.secondGame').css({'width':'100%','height':'100%'})
$('#game2').css({'width':'100%','height':'100%'})
$('.thirdGame').css({'width':'0','height':'0'})
$('#game3').css({'width':'0','height':'0'})
})
$('.game3Next').click(function(){
$('.game3Index').remove()
$('#game4').load('game4.html');
$('.thirdGame').css({'width':'0','height':'0'})
$('#game3').css({'width':'0','height':'0'})
$('.fourGame').css({'width':'100%','height':'100%'})
$('#game4').css({'width':'100%','height':'100%'})
})
</script>

205
game4.html

@ -0,0 +1,205 @@
<link rel="stylesheet" type="text/css" href="css/game4.css" />
<div class="game4Index">
<p class="bgm"><img src="img/game4/game4Bgm.png" /></p>
<div class="box_wrap">
<ul class="imgList">
<li><img style="width: .96rem;" src="img/game4/lin1.png" />
<p></p>
</li>
<li><img style="width: .92rem;" src="img/game4/lin2.png" />
<p></p>
</li>
<li><img style="width: .94rem;" src="img/game4/lin3.png" />
<p></p>
</li>
<!--<li></li>
<li></li>
<li></li>-->
</ul>
<div class="clickIcon">
<ul>
<li class="click1 click"><img src="img/game4/icon1.png"/></li>
<li class="click2 click"><img src="img/game4/icon2.png"/></li>
<li class="click3 click"><img src="img/game4/icon3.png"/></li>
</ul>
</div>
</div>
<div class="book_box">
<div class="line">
<!--<p class="leftIcon">
< </p>
<p class="rightIcon"> > </p>-->
</div>
<div class="closeIcon"><img src="img/close.png" /></div>
<div class="bookCont">
<div class="leftImg">
<div class="titleTip">
<p>飞跃夹金山</p>
<p class="img"><img src="img/img2.png" /></p>
</div>
<div class="imgList">
<img src="img/game4.png" />
</div>
</div>
<div class="rightCont">
<div class="titleTip">
<h2>故事原型</h2>
<h5>飞跃夹金山</h5>
</div>
<ul class="textList">
<video width="210" height="150" style="object-fit: fill;" id="video4" controls="controls">
<source src="img/video/game4.mp4" type="video/mp4"></source>
</video>
</ul>
<!--<p class="pageNum"><text>1</text>/<span>5</span></p>-->
</div>
</div>
</div>
<div class="maskBgm"></div>
<!--下一关-->
<div class="successBox">
<!--<div class="shut"><img src="img/close.png" /></div>-->
<p class="above game4Above"><img src="img/aboveIcon.png" /></p>
<p class="next game4Next"><img src="img/nextIcon.png" /></p>
</div>
</div>
<script type="text/javascript">
var num4 = 0;
// var contList4 = [
// '飞夺泸定桥:1935年5月,北上抗日的红军向天险大渡河挺进。大渡河水流湍急,两岸都是高山峻岭,只有一座铁索桥可以通过。这座铁索桥,就是红军北上必须夺取的泸定桥。国民党反动派派了两个团防守泸定桥,阻拦红军北上;后来又调了两个旅赶去增援,妄想把我红军消灭在桥头上。我军早就看穿了敌人的诡计。28日早上,红四团接到上级命令:“29日早晨夺下泸定桥!”时间只剩下20多个小时了',
// '红四团离泸定桥还有240里。敌人的两个旅援兵正在对岸向泸定桥行进。抢在敌人前头,是我军战胜敌人的关键。红四团翻山越岭,沿路击溃了好几股阻击的敌人,到晚上7点钟,离泸定桥还有110里。战士们一整天没顾得上吃饭。天又下起雨来,把他们都淋透了。战胜敌人的决心使他们忘记了饥饿和疲劳。在漆黑的夜里,他们冒着雨,踩着泥水继续前进。忽然对岸出现了无数火把,像一条长蛇向泸定桥的',
// '方向奔去,分明是敌人的增援部队。红四团的战士索性也点起火把,照亮了道路跟对岸的敌人赛跑。敌人看到了这边的火把,扯着嗓子喊:“你们是哪个部分的?”我们的战士高声答话:“是碰上红军撤下来的。”对岸的敌人并不疑心。两支军队像两条火龙,隔着大渡河走了二三十里。雨越下越猛,像瓢泼一样,把两岸的火把都浇灭了。对岸的敌人不能再走,只好停下来宿营。红四团仍旧摸黑冒雨前进,终于在',
// '29日清晨赶到了泸定桥,把增援的两个旅的敌人抛在后面了。',
// ]
// var liCont4 = '';
// var pageNum4 = 1;
// var total4= contList4.length
// for(var i = 0; i <= contList4.length; i++) {
// liCont4 += '<li>' + contList4[i] + '</i>'
// }
// $('.game4Index .textList').html(liCont4)
// $('.game4Index .textList li').eq(0).show().siblings().hide()
// $('.game4Index .pageNum span').text(total4)
// $('.game4Index .pageNum text').text(pageNum4)
// $('.game4Index .leftIcon').click(function() {
// if(pageNum4 > 1) {
// pageNum4--;
// $('.pageNum text').text(pageNum4)
// $('.textList li').eq(pageNum4 - 1).show().siblings().hide()
// }
// })
// $('.game4Index .rightIcon').click(function() {
// if(pageNum4 < total4) {
// pageNum4++;
// $('.game4Index .pageNum text').text(pageNum4)
// $('.game4Index .textList li').eq(pageNum4 - 1).show().siblings().hide()
// }
// if(pageNum4 == total4) {
// setTimeout(function() {
// $('.game4Index .book_box').fadeOut()
// $('.game4Index .successBox').css('display', 'flex')
// }, 1500)
// }
// })
var video4 = document.getElementById("video4");
  video4.loop = false;
  video4.addEventListener('ended', function () {
$('.book_box').fadeOut()
$('.successBox').css('display', 'flex')
  //监听到播放结束后,在此处可调用自己的接口
console.log('播放完毕')
  }, false);
$('.game4Index .click1').click(function() {
$('.game4Index .click1 img').css('display','block')
$('.game4Index .click1').animate({
'top': '2.5%',
"right": '25%',
'transform': 'translate(-50%,-50%)'
}, 1000)
// setTimeout(function() {
// $('.game4Index .click1').css('opacity', '0')
// }, 1000)
$('.game4Index .imgList li').eq(0).find('img').fadeOut(1500)
num4++;
success4();
})
$('.game4Index .click2').click(function() {
$('.game4Index .click2 img').css('display','block')
$('.game4Index .click2').animate({
'top': '5%',
"right": '11.5%',
'transform': 'translate(-50%,-50%)'
}, 1000)
// setTimeout(function() {
// $('.game4Index .click2').css('opacity', '0')
// }, 1000)
$('.game4Index .imgList li').eq(1).find('img').fadeOut(1500)
num4++;
success4();
})
$('.game4Index .click3').click(function() {
$('.game4Index .click3 img').css('display','block')
$('.game4Index .click3').animate({
'top': '2%',
"right": '4.5%',
'transform': 'translate(-50%,-50%)',
}, 1000)
// setTimeout(function() {
// $('.game4Index .click3').css('opacity', '0')
// }, 1000)
$('.game4Index .imgList li').eq(2).find('img').fadeOut(1500)
num4++;
success4();
})
$('.game4Index .closeIcon').click(function() {
$('.book_box').fadeOut()
$('.successBox').css('display', 'flex')
video4.pause()
})
function success4() {
if(num4 == 3) {
console.log('成功')
setTimeout(function() {
$('.game4Index p.bgm img').attr('src', 'img/game4/successBgm.png')
$('.game4Index .box_wrap').fadeOut();
}, 1500)
setTimeout(function() {
$('.game4Index .book_box').fadeIn()
$('.game4Index .maskBgm').fadeIn()
video4.play()
}, 3500)
}
}
$('.game4Above').click(function(){
$('#game3').load('game3.html');
$('.game4Index').remove();
$('.thirdGame').css({'width':'100%','height':'100%'})
$('#game3').css({'width':'100%','height':'100%'})
$('.fourGame').css({'width':'0','height':'0'})
$('#game4').css({'width':'0','height':'0'})
})
$('.game4Next').click(function(){
$('.game4Index').remove();
$('#game5').load('game5.html');
$('.fourGame').css({'width':'0','height':'0'})
$('#game4').css({'width':'0','height':'0'})
$('.fiveGame').css({'width':'100%','height':'100%'})
$('#game5').css({'width':'100%','height':'100%'})
})
</script>

202
game5.html

@ -0,0 +1,202 @@
<link rel="stylesheet" type="text/css" href="css/game5.css" />
<div class="game5Index">
<p class="bgm"><img src="img/game5/bgm.png" /></p>
<div class="box_wrap">
<ul class="imgList">
<li><img style="width: .96rem;" src="img/game5/lin1.png" />
<p></p>
</li>
<li><img style="width: .92rem;" src="img/game5/lin2.png" />
<p></p>
</li>
<li><img style="width: .94rem;" src="img/game5/lin3.png" />
<p></p>
</li>
<!--<li></li>
<li></li>
<li></li>-->
</ul>
<div class="clickIcon">
<ul>
<li class="click1 click"><img src="img/game5/icon1.png"/></li>
<li class="click2 click"><img src="img/game5/icon2.png"/></li>
<li class="click3 click"><img src="img/game5/icon3.png"/></li>
</ul>
</div>
</div>
<div class="book_box">
<div class="line">
<p class="leftIcon">
< </p>
<p class="rightIcon"> > </p>
</div>
<div class="closeIcon"><img src="img/close.png" /></div>
<div class="bookCont">
<div class="leftImg">
<div class="titleTip">
<p>九个炊事员</p>
<p class="img"><img src="img/img2.png" /></p>
</div>
<div class="imgList">
<img src="img/game4.png" />
</div>
</div>
<div class="rightCont">
<div class="titleTip">
<h2>故事原型</h2>
<h5>九个炊事员</h5>
</div>
<ul class="textList">
<video width="210" height="150" style="object-fit: fill;" id="video5" controls="controls">
<source src="img/video/game5.mp4" type="video/mp4"></source>
</video>
</ul>
<!--<p class="pageNum"><text>1</text>/<span>5</span></p>-->
</div>
</div>
</div>
<div class="maskBgm"></div>
<!--下一关-->
<div class="successBox">
<!--<div class="shut"><img src="img/close.png" /></div>-->
<p class="above game5Above"><img src="img/aboveIcon.png" /></p>
<p class="next game5Next"><img src="img/nextIcon.png" /></p>
</div>
</div>
<script type="text/javascript">
var num5 = 0;
// var contList5 = [
// '飞夺泸定桥:1935年5月,北上抗日的红军向天险大渡河挺进。大渡河水流湍急,两岸都是高山峻岭,只有一座铁索桥可以通过。这座铁索桥,就是红军北上必须夺取的泸定桥。国民党反动派派了两个团防守泸定桥,阻拦红军北上;后来又调了两个旅赶去增援,妄想把我红军消灭在桥头上。我军早就看穿了敌人的诡计。28日早上,红四团接到上级命令:“29日早晨夺下泸定桥!”时间只剩下20多个小时了',
// '红四团离泸定桥还有240里。敌人的两个旅援兵正在对岸向泸定桥行进。抢在敌人前头,是我军战胜敌人的关键。红四团翻山越岭,沿路击溃了好几股阻击的敌人,到晚上7点钟,离泸定桥还有110里。战士们一整天没顾得上吃饭。天又下起雨来,把他们都淋透了。战胜敌人的决心使他们忘记了饥饿和疲劳。在漆黑的夜里,他们冒着雨,踩着泥水继续前进。忽然对岸出现了无数火把,像一条长蛇向泸定桥的',
// '方向奔去,分明是敌人的增援部队。红四团的战士索性也点起火把,照亮了道路跟对岸的敌人赛跑。敌人看到了这边的火把,扯着嗓子喊:“你们是哪个部分的?”我们的战士高声答话:“是碰上红军撤下来的。”对岸的敌人并不疑心。两支军队像两条火龙,隔着大渡河走了二三十里。雨越下越猛,像瓢泼一样,把两岸的火把都浇灭了。对岸的敌人不能再走,只好停下来宿营。红四团仍旧摸黑冒雨前进,终于在',
// '29日清晨赶到了泸定桥,把增援的两个旅的敌人抛在后面了。',
// ]
// var liCont5 = '';
// var pageNum5 = 1;
// var total5= contList5.length
// for(var i = 0; i <= contList5.length; i++) {
// liCont5 += '<li>' + contList5[i] + '</i>'
// }
// $('.game5Index .textList').html(liCont5)
// $('.game5Index .textList li').eq(0).show().siblings().hide()
// $('.game5Index .pageNum span').text(total5)
// $('.game5Index .pageNum text').text(pageNum5)
//
// $('.game5Index .leftIcon').click(function() {
// if(pageNum5 > 1) {
// pageNum5--;
// $('.pageNum text').text(pageNum5)
// $('.textList li').eq(pageNum5 - 1).show().siblings().hide()
// }
// })
// $('.game5Index .rightIcon').click(function() {
// if(pageNum5 < total5) {
// pageNum5++;
// $('.game5Index .pageNum text').text(pageNum5)
// $('.game5Index .textList li').eq(pageNum5 - 1).show().siblings().hide()
// }
// if(pageNum5 == total5) {
// setTimeout(function() {
// $('.game5Index .book_box').fadeOut()
// $('.game5Index .successBox').css('display', 'flex')
// }, 1500)
// }
// })
var video5 = document.getElementById("video5");
  video5.loop = false;
  video5.addEventListener('ended', function () {
$('.book_box').fadeOut()
$('.successBox').css('display', 'flex')
  //监听到播放结束后,在此处可调用自己的接口
console.log('播放完毕5')
  }, false);
$('.game5Index .click1').click(function() {
$('.game5Index .click1 img').css('display','block')
$('.game5Index .click1').animate({
'top': '1.5%',
"right": '17.5%',
'transform': 'translate(-50%,-50%)'
}, 1000)
// setTimeout(function() {
// $('.game5Index .click1').css('opacity', '0')
// }, 1000)
$('.game5Index .imgList li').eq(0).find('img').fadeOut(1500)
num5++;
success5();
})
$('.game5Index .click2').click(function() {
$('.game5Index .click2 img').css('display','block')
$('.game5Index .click2').animate({
'top': '3%',
"right": '11.5%',
'transform': 'translate(-50%,-50%)'
}, 1000)
// setTimeout(function() {
// $('.game5Index .click2').css('opacity', '0')
// }, 1000)
$('.game5Index .imgList li').eq(1).find('img').fadeOut(1500)
num5++;
success5();
})
$('.game5Index .click3').click(function() {
$('.game5Index .click3 img').css('display','block')
$('.game5Index .click3').animate({
'top': '3%',
"right": '1.5%',
'transform': 'translate(-50%,-50%)',
}, 1000)
// setTimeout(function() {
// $('.game5Index .click3').css('opacity', '0')
// }, 1000)
$('.game5Index .imgList li').eq(2).find('img').fadeOut(1500)
num5++;
success5();
})
$('.game5Index .closeIcon').click(function() {
$('.book_box').fadeOut()
$('.successBox').css('display', 'flex')
video5.pause()
})
function success5() {
if(num5 == 3) {
console.log('成功')
setTimeout(function() {
$('.game5Index p.bgm img').attr('src', 'img/game5/successBgm.png')
$('.game5Index .box_wrap').fadeOut();
}, 1500)
setTimeout(function() {
$('.game5Index .book_box').fadeIn()
$('.game5Index .maskBgm').fadeIn()
video5.play()
}, 3500)
}
}
$('.game5Above').click(function(){
$('#game4').load('game4.html');
$('.game5Index').remove();
$('.fiveGame').css({'width':'0','height':'0'})
$('#game5').css({'width':'0','height':'0'})
$('.fourGame').css({'width':'100%','height':'100%'})
$('#game4').css({'width':'100%','height':'100%'})
})
$('.game5Next').click(function(){
$('.game5Index').remove();
$('#success').load('success.html');
$('.fiveGame').css({'width':'0','height':'0'})
$('#game5').css({'width':'0','height':'0'})
$('.win').css({'width':'100%','height':'100%'})
$('#success').css({'width':'100%','height':'100%'})
})
</script>

BIN
img/aboveIcon.png

Before After
Width: 245  |  Height: 84  |  Size: 11 KiB

BIN
img/begin.png

Before After
Width: 1334  |  Height: 750  |  Size: 1.5 MiB

BIN
img/beginBtn.png

Before After
Width: 344  |  Height: 83  |  Size: 20 KiB

BIN
img/bookBgm.png

Before After
Width: 993  |  Height: 589  |  Size: 307 KiB

BIN
img/close.png

Before After
Width: 55  |  Height: 55  |  Size: 1.7 KiB

BIN
img/game1/bgm.png

Before After
Width: 1334  |  Height: 750  |  Size: 1.2 MiB

BIN
img/game1/icon1.png

Before After
Width: 96  |  Height: 68  |  Size: 8.5 KiB

BIN
img/game1/icon2.png

Before After
Width: 92  |  Height: 66  |  Size: 6.9 KiB

BIN
img/game1/icon3.png

Before After
Width: 94  |  Height: 53  |  Size: 8.7 KiB

BIN
img/game1/kuang.png

Before After
Width: 121  |  Height: 120  |  Size: 6.7 KiB

BIN
img/game1/lin1.png

Before After
Width: 102  |  Height: 74  |  Size: 4.6 KiB

BIN
img/game1/lin2.png

Before After
Width: 98  |  Height: 71  |  Size: 2.5 KiB

BIN
img/game1/lin3.png

Before After
Width: 100  |  Height: 59  |  Size: 2.3 KiB

BIN
img/game1/successBgm.png

Before After
Width: 1332  |  Height: 750  |  Size: 1.4 MiB

BIN
img/game2.png

Before After
Width: 358  |  Height: 414  |  Size: 275 KiB

BIN
img/game2/game2Bgm.png

Before After
Width: 1334  |  Height: 750  |  Size: 1.6 MiB

BIN
img/game2/icon1.png

Before After
Width: 74  |  Height: 76  |  Size: 5.8 KiB

BIN
img/game2/icon2.png

Before After
Width: 90  |  Height: 73  |  Size: 6.2 KiB

BIN
img/game2/icon3.png

Before After
Width: 94  |  Height: 34  |  Size: 4.2 KiB

BIN
img/game2/icon31.png

Before After
Width: 82  |  Height: 66  |  Size: 12 KiB

BIN
img/game2/lin1.png

Before After
Width: 80  |  Height: 82  |  Size: 2.7 KiB

BIN
img/game2/lin2.png

Before After
Width: 96  |  Height: 79  |  Size: 2.9 KiB

BIN
img/game2/lin3.png

Before After
Width: 100  |  Height: 40  |  Size: 1.4 KiB

BIN
img/game2/successBgm.png

Before After
Width: 1332  |  Height: 750  |  Size: 1014 KiB

BIN
img/game3.png

Before After
Width: 358  |  Height: 414  |  Size: 272 KiB

BIN
img/game3/bgm.png

Before After
Width: 1334  |  Height: 750  |  Size: 1.5 MiB

BIN
img/game3/icon1.png

Before After
Width: 66  |  Height: 81  |  Size: 3.0 KiB

BIN
img/game3/icon2.png

Before After
Width: 74  |  Height: 56  |  Size: 5.9 KiB

BIN
img/game3/icon3.png

Before After
Width: 60  |  Height: 85  |  Size: 4.5 KiB

BIN
img/game3/lin1.png

Before After
Width: 69  |  Height: 84  |  Size: 1.3 KiB

BIN
img/game3/lin2.png

Before After
Width: 77  |  Height: 58  |  Size: 3.4 KiB

BIN
img/game3/lin3.png

Before After
Width: 55  |  Height: 79  |  Size: 1.3 KiB

BIN
img/game3/successBgm.png

Before After
Width: 1334  |  Height: 750  |  Size: 1.5 MiB

BIN
img/game4.png

Before After
Width: 358  |  Height: 414  |  Size: 279 KiB

BIN
img/game4/game4Bgm.png

Before After
Width: 1334  |  Height: 750  |  Size: 470 KiB

BIN
img/game4/icon1.png

Before After
Width: 91  |  Height: 64  |  Size: 4.2 KiB

BIN
img/game4/icon2.png

Before After
Width: 89  |  Height: 38  |  Size: 6.2 KiB

BIN
img/game4/icon3.png

Before After
Width: 72  |  Height: 77  |  Size: 4.9 KiB

BIN
img/game4/lin1.png

Before After
Width: 99  |  Height: 72  |  Size: 3.1 KiB

BIN
img/game4/lin2.png

Before After
Width: 97  |  Height: 46  |  Size: 1.7 KiB

BIN
img/game4/lin3.png

Before After
Width: 80  |  Height: 85  |  Size: 3.4 KiB

BIN
img/game4/successBgm.png

Before After
Width: 1334  |  Height: 750  |  Size: 909 KiB

BIN
img/game5.png

Before After
Width: 358  |  Height: 414  |  Size: 269 KiB

BIN
img/game5/bgm.png

Before After
Width: 1334  |  Height: 750  |  Size: 1.3 MiB

BIN
img/game5/icon1.png

Before After
Width: 80  |  Height: 59  |  Size: 3.1 KiB

BIN
img/game5/icon2.png

Before After
Width: 81  |  Height: 64  |  Size: 10 KiB

BIN
img/game5/icon3.png

Before After
Width: 83  |  Height: 64  |  Size: 12 KiB

BIN
img/game5/lin1.png

Before After
Width: 86  |  Height: 65  |  Size: 1.9 KiB

BIN
img/game5/lin2.png

Before After
Width: 87  |  Height: 70  |  Size: 2.3 KiB

BIN
img/game5/lin3.png

Before After
Width: 89  |  Height: 70  |  Size: 2.3 KiB

BIN
img/game5/successBgm.png

Before After
Width: 1334  |  Height: 750  |  Size: 1.3 MiB

BIN
img/guizeBgm.png

Before After
Width: 1013  |  Height: 578  |  Size: 96 KiB

BIN
img/icon.png

Before After
Width: 41  |  Height: 23  |  Size: 1.2 KiB

BIN
img/img1.png

Before After
Width: 358  |  Height: 414  |  Size: 282 KiB

BIN
img/img2.png

Before After
Width: 118  |  Height: 91  |  Size: 9.5 KiB

BIN
img/loading.png

Before After
Width: 1334  |  Height: 750  |  Size: 876 KiB

BIN
img/nextIcon.png

Before After
Width: 245  |  Height: 84  |  Size: 11 KiB

BIN
img/success.png

Before After
Width: 953  |  Height: 583  |  Size: 223 KiB

BIN
img/success/bgm.png

Before After
Width: 1334  |  Height: 750  |  Size: 831 KiB

BIN
img/success/word.png

Before After
Width: 635  |  Height: 271  |  Size: 74 KiB

BIN
img/video/game4.mp4

BIN
img/video/game5.mp4

93
index.html

@ -0,0 +1,93 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>长征</title>
<meta name="keywords" content="keyword1,keyword2,keyword3">
<meta name="description" content="this is my page">
<meta name="content-type" content="text/html; charset=UTF-8">
<meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0">
<script src="js/jquery-1.8.3.min.js" type="text/javascript" charset="utf-8"></script>
<script src="js/style.js" type="text/javascript" charset="utf-8"></script>
<link rel="stylesheet" type="text/css" href="css/style.css" />
<link rel="stylesheet" type="text/css" href="css/index.css" />
</head>
<body>
<div id="wrap">
<!--加载页-->
<div class="loading">
<img src="img/loading.png" class="load" />
<!--进度条-->
<div class="flex-center">
<h3>加载中...</h3>
<span class="container">
<span id="progressBar" class="h-100P bar"><text></text></span>
</span>
</div>
</div>
<!--开始页-->
<div class="begin">
<div id="begin"></div>
</div>
<!--第一关-->
<div class="firstGame">
<div id="game1"></div>
</div>
<!--第二关-->
<div class="secondGame">
<div id="game2"></div>
</div>
<!--第三关-->
<div class="thirdGame">
<div id="game3"></div>
</div>
<!--第四关-->
<div class="fourGame">
<div id="game4"></div>
</div>
<!--第五关-->
<div class="fiveGame">
<div id="game5"></div>
</div>
<!--成功-->
<div class="win">
<div id="success"></div>
</div>
</div>
</body>
</html>
<script src="js/common.js" type="text/javascript" charset="utf-8"></script>
<script>
alert('请横屏使用!')
$("#begin").load("begin.html");
$("#game1").load("game1.html");
// $("#game2").load("game2.html");
// $("#game3").load("game3.html");
// $("#game4").load("game4.html");
// $("#game5").load("game5.html");
// $("#success").load("success.html");
$(document).ready(function() {
//进度条
var percentage = 0;
var interval = setInterval(function() {
if(percentage < 500) {
percentage++;
var widthTemp = (percentage / 5).toFixed(1) + '%';
$('#progressBar').css('width', widthTemp);
} else {
clearInterval(interval);
setTimeout(function() {
clearInterval(interval)
$('.flex-center').fadeOut(10)
// $('.begin').fadeIn(100)
$('.load').attr('src','img/begin.png')
$('.begin').css('display','block')
}, 500);
}
}, 10);
});
</script>

47
js/common.js

@ -0,0 +1,47 @@
// 横屏
var detectOrient = function() {
var width = document.documentElement.clientWidth,
height = document.documentElement.clientHeight,
wrapper = document.getElementById("wrap"),
style = "";
if(width >= height) { // 竖屏
style += "width:100%";
style += "height:100%;";
style += "-webkit-transform: rotate(0); transform: rotate(0);";
style += "-webkit-transform-origin: 0 0;";
style += "transform-origin: 0 0;";
} else { // 横屏
style += "width:" + height + "px;"; // 注意旋转后的宽高切换
style += "height:" + width + "px;";
style += "-webkit-transform: rotate(90deg); transform: rotate(90deg);";
// 注意旋转中点的处理
style += "-webkit-transform-origin: " + width / 2 + "px " + width / 2 + "px;";
style += "transform-origin: " + width / 2 + "px " + width / 2 + "px;";
}
wrapper.style.cssText = style;
}
window.onresize = detectOrient;
detectOrient();
//$(document).ready(function(){
var browser = {
versions: function() {
var u = navigator.userAgent,
app = navigator.appVersion;
return { //移动终端浏览器版本信息
trident: u.indexOf('Trident') > -1, //IE内核
presto: u.indexOf('Presto') > -1, //opera内核
webKit: u.indexOf('AppleWebKit') > -1, //苹果、谷歌内核
gecko: u.indexOf('Gecko') > -1 && u.indexOf('KHTML') == -1, //火狐内核
mobile: !!u.match(/AppleWebKit.*Mobile.*/), //是否为移动终端
ios: !!u.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/), //ios终端
android: u.indexOf('Android') > -1 || u.indexOf('Linux') > -1, //android终端或uc浏览器
iPhone: u.indexOf('iPhone') > -1, //是否为iPhone或者QQHD浏览器
iPad: u.indexOf('iPad') > -1, //是否iPad
webApp: u.indexOf('Safari') == -1 //是否web应该程序,没有头部与底部
};
}(),
language: (navigator.browserLanguage || navigator.language).toLowerCase()
}

2
js/jquery-1.8.3.min.js
File diff suppressed because it is too large
View File

47
js/style.js

@ -0,0 +1,47 @@
//适配
(function(designWidth, maxWidth) {
var doc = document,
win = window,
docEl = doc.documentElement,
remStyle = document.createElement("style"),
tid;
function refreshRem() {
var width = docEl.getBoundingClientRect().width;
maxWidth = maxWidth || 540;
width > maxWidth && (width = maxWidth);
var rem = width * 100 / designWidth;
remStyle.innerHTML = 'html{font-size:' + rem + 'px;}';
}
if(docEl.firstElementChild) {
docEl.firstElementChild.appendChild(remStyle);
} else {
var wrap = doc.createElement("div");
wrap.appendChild(remStyle);
doc.write(wrap.innerHTML);
wrap = null;
}
//要等 wiewport 设置好后才能执行 refreshRem,不然 refreshRem 会执行2次;
refreshRem();
win.addEventListener("resize", function() {
clearTimeout(tid); //防止执行两次
tid = setTimeout(refreshRem, 300);
}, false);
win.addEventListener("pageshow", function(e) {
if(e.persisted) { // 浏览器后退的时候重新计算
clearTimeout(tid);
tid = setTimeout(refreshRem, 300);
}
}, false);
if(doc.readyState === "complete") {
doc.body.style.fontSize = "16px";
} else {
doc.addEventListener("DOMContentLoaded", function(e) {
doc.body.style.fontSize = "16px";
}, false);
}
})(750, 750);

26
success.html

@ -0,0 +1,26 @@
<style type="text/css">
.sucIndex{
width: 100%;
height: 100%;
}
.sucIndex img{
width: 100%;
height: 100%;
}
.sucIndex .shi{
width: 6.35rem;
height: 2.71rem;
position: absolute;
left: 50%;
top:50%;
transform: translate(-50%,-50%);
}
</style>
<div class="sucIndex">
<p class="bgm"><img src="img/success/bgm.png" /></p>
<div class="shi">
<img src="img/success/word.png"/>
</div>
</div>
Loading…
Cancel
Save