style.css 5.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352
  1. html,body,div,p,ul,li,span,h1,h2,h3 {
  2. padding: 0;
  3. margin: 0;
  4. }
  5. html,body{
  6. width: 100%;
  7. height: 100%;
  8. overflow: hidden;
  9. color: #fff;
  10. }
  11. .view {
  12. width: 640px;
  13. height: 100%;
  14. margin: 0 auto;
  15. background: url(../images/bg.jpg) center 0 no-repeat;
  16. background-size: cover;
  17. -webkit-touch-callout: none; /*防止用户复制和保存图片*/
  18. -webkit-user-select: none; /*禁用了复制粘贴功能*/
  19. -moz-user-select: none;
  20. position: relative;
  21. }
  22. #page_index,#page_game,#page_gameOver{
  23. width: 100%;
  24. height: 100%;
  25. position: relative;
  26. overflow: hidden;
  27. }
  28. /*page_index*/
  29. .index_img {
  30. width: 523px;
  31. height: 310px;
  32. background: url(../images/index_img.png) no-repeat;
  33. margin-left: 60px;
  34. margin-top: 120px;
  35. }
  36. .index_text {
  37. height: 47px;
  38. background: url(../images/index_text.png) no-repeat;
  39. padding-left: 340px;
  40. line-height: 50px;
  41. font-size: 40px;
  42. margin-top: 20px;
  43. margin-left: 120px;
  44. }
  45. #start_btn {
  46. position: absolute;
  47. display: inline-block;
  48. width: 290px;
  49. height: 302px;
  50. background: url(../images/start_btn.png) no-repeat;
  51. bottom: 80px;
  52. left: 175px;
  53. }
  54. .boyaaLogo {
  55. display: inline-block;
  56. position: absolute;
  57. width: 224px;
  58. height: 52px;
  59. background: url(../images/boyaalogo.png) no-repeat;
  60. right: 15px;
  61. bottom: 10px;
  62. }
  63. #voice_btn,.help_btn {
  64. display: inline-block;
  65. width: 67px;
  66. height: 72px;
  67. position: absolute;
  68. top: 20px;
  69. background: url(../images/top_btn.png) no-repeat;
  70. }
  71. #voice_btn{
  72. left: 20px;
  73. background-position: 0 0;
  74. }
  75. #voice_btn.off{
  76. background-position: 0 -80px;
  77. }
  78. .help_btn{
  79. right: 20px;
  80. background-position: 0 -160px;
  81. }
  82. /*page_game*/
  83. header .highest,header .score,#new_game_button,#share_btn,#continue_btn{
  84. background: url(../images/btn_img.png) no-repeat;
  85. display: inline-block;
  86. }
  87. header {
  88. display: block;
  89. width: 100%;
  90. overflow: hidden;
  91. padding-top:30px;
  92. padding-bottom: 30px;
  93. }
  94. header .highest,header .score{
  95. float: left;
  96. width: 202px;
  97. height: 94px;
  98. margin-left: 10px;
  99. overflow: hidden;
  100. }
  101. header .highest span,header .score span{
  102. display: block;
  103. width: 90px;
  104. height: 30px;
  105. margin-top: 47px;
  106. margin-left: 75px;
  107. text-align: center;
  108. font-size: 26px;
  109. line-height: 30px;
  110. }
  111. header .highest {
  112. margin-left: 15px;
  113. background-position: 0 -328px;
  114. }
  115. header .score {
  116. background-position: 0 -216px;
  117. }
  118. header #new_game_button {
  119. display: block;
  120. width: 81px;
  121. height: 87px;
  122. float: right;
  123. margin-right: 30px;
  124. background-position: 0 -437px;
  125. }
  126. header p {
  127. font-family: Arial;
  128. font-size: 25px;
  129. margin: 5px auto;
  130. }
  131. #game_container {
  132. width: 100%;
  133. overflow: hidden;
  134. position: absolute;
  135. top:50%;
  136. left: 50%;
  137. margin-left: -290px;
  138. margin-top: -230px;
  139. }
  140. #grid_container {
  141. width: 580px;
  142. height: 660px;
  143. background-color: #102F42;
  144. border-radius: 10px;
  145. position: relative;
  146. }
  147. .grid_cell {
  148. width: 110px;
  149. height: 110px;
  150. border-radius: 6px;
  151. background-color: #17394D;
  152. position: absolute;
  153. }
  154. .number_cell {
  155. border-radius: 6px;
  156. font-family: Arial;
  157. font-weight: bold;
  158. font-size: 20px;
  159. line-height: 26px;
  160. text-align: center;
  161. position: absolute;
  162. overflow: hidden;
  163. background-size: 100% 100%;
  164. z-index: 3;
  165. }
  166. .number_cell span{
  167. display: block;
  168. width: 60px;
  169. height: 25px;
  170. margin: 100px auto 0 auto;
  171. background-color: rgba(0, 0, 0, 0.6);
  172. border: 2px solid #fff;
  173. border-radius: 10px;
  174. }
  175. footer{
  176. display: block;
  177. margin: 0px auto;
  178. width: 100px;
  179. padding: 10px 10px;
  180. font-family: Arial;
  181. color: white;
  182. border-radius: 10px;
  183. text-decoration: none;
  184. }
  185. /*gameOver*/
  186. #page_gameOver,#page_share{
  187. position: fixed;
  188. top: 0;
  189. left: 0;
  190. right: 0;
  191. bottom: 0;
  192. z-index: 10;
  193. }
  194. #page_help {
  195. position: absolute;
  196. top: 0;
  197. left: 0;
  198. bottom: 0;
  199. width: 640px;
  200. text-align: center;
  201. background-image:-webkit-linear-gradient(bottom, #107DE4, #032147);
  202. background-image:-o-linear-gradient(bottom, #107DE4, #032147);
  203. background-image:linear-gradient(to top, #107DE4, #032147);
  204. }
  205. #close_help_btn {
  206. position: absolute;
  207. bottom: 50px;
  208. left: 50%;
  209. margin-left: -185px;
  210. }
  211. #page_gameOver:before,#page_share:before{
  212. display: block;
  213. content: " ";
  214. background-color: rgba(0, 0, 0, 0.7);
  215. position: absolute;
  216. top: 0;
  217. left: 0;
  218. bottom: 0;
  219. right:0;
  220. }
  221. #gameOver {
  222. position: relative;
  223. width: 602px;
  224. height: 650px;
  225. background: url(../images/gameover.png) no-repeat;
  226. z-index: 10;
  227. top:50%;
  228. left: 50%;
  229. margin-left: -301px;
  230. margin-top: -350px;
  231. overflow: hidden;
  232. }
  233. #this_score {
  234. position: absolute;
  235. top:325px;
  236. left: 250px;
  237. font-size: 40px;
  238. font-weight: 700;
  239. }
  240. #highest_score {
  241. position: absolute;
  242. top:420px;
  243. left: 370px;
  244. font-size: 40px;
  245. color:#4a85af;
  246. font-weight: 700;
  247. }
  248. #share_btn,#continue_btn{
  249. width: 269px;
  250. height: 95px;
  251. position: absolute;
  252. top:550px;
  253. }
  254. #share_btn{
  255. background-position: 0 0;
  256. left: 20px;
  257. }
  258. #continue_btn{
  259. background-position: 0 -109px;
  260. right: 20px;
  261. }
  262. #grid_container .number_cell {
  263. position: absolute;
  264. -webkit-transition: -webkit-transform 200ms ease-in-out;
  265. -moz-transition: -moz-transform 200ms ease-in-out;
  266. transition: transform 200ms ease-in-out;
  267. background-image: url(../images/ren.png);
  268. background-repeat: no-repeat;
  269. background-size: 120px 727px;
  270. }
  271. .anim_add{
  272. width:180px;
  273. height: 180px;
  274. position:absolute;
  275. z-index:12;
  276. background:url(../images/animation1.png) no-repeat 180px bottom;
  277. -webkit-animation:add 400ms steps(10) 0s;
  278. }
  279. @-webkit-keyframes add{
  280. 0%{
  281. background-position: 0 0;
  282. }
  283. 100%{
  284. background-position: -1800px 0;
  285. }
  286. }
  287. .anim_eli{
  288. width:200px;
  289. height: 200px;
  290. position:absolute;
  291. z-index:12;
  292. background:url(../images/animation2.png) no-repeat 200px bottom;
  293. -webkit-animation:eli 400ms steps(7) 0s;
  294. }
  295. @-webkit-keyframes eli{
  296. 0%{
  297. background-position: 0 0;
  298. }
  299. 100%{
  300. background-position: -1400px 0;
  301. }
  302. }
  303. .cont_wrap{
  304. position: absolute;
  305. z-index: 11;
  306. top:15px;
  307. right: 0px;
  308. }
  309. .boss_key, .boss_Qr {
  310. position: absolute;
  311. bottom: 50px;
  312. }
  313. .boss_key {
  314. left: 50%;
  315. margin-left: 450px;
  316. }
  317. .boss_Qr {
  318. left: 50%;
  319. margin-left: -674px;
  320. }