main.css 6.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402
  1. /* !
  2. * @overview:主样式 */
  3. html {
  4. color: #545454;
  5. background-color: #fff;
  6. -webkit-text-size-adjust: 100%;
  7. -webkit-touch-callout: none;
  8. -webkit-user-select: none;
  9. -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
  10. }
  11. html, img, body, div {
  12. -webkit-user-select: none;
  13. user-select: none;
  14. }
  15. html, body, h1, h2, h3, h4, h5, h6, hr, p, blockquote, dl, dt, dd, ul, ol, li, pre, form, fieldset, legend, button, input, textarea, th, td, img {
  16. margin: 0;
  17. padding: 0;
  18. }
  19. body, button, input, select, textarea {
  20. font: 14px/1.5 "Helvetica neue", Helvetica, Tahoma, Arial, "\5FAE\8F6F\96C5\9ED1", "\5B8B\4F53", sans-serif;
  21. }
  22. article, aside, details, figcaption, figure, footer, header, hgroup, menu, nav, section {
  23. margin: 0;
  24. padding: 0;
  25. display: block;
  26. }
  27. audio, canvas, video {
  28. display: inline-block;
  29. *display: inline;
  30. *zoom: 1;
  31. }
  32. img {
  33. border: 0 none;
  34. max-width: 100%;
  35. height: auto;
  36. }
  37. table {
  38. border-collapse: collapse;
  39. border-spacing: 0;
  40. }
  41. h1, h2, h3, h4, h5, h6 {
  42. font-size: 100%;
  43. }
  44. i, em {
  45. font-style: normal;
  46. }
  47. ul, ol {
  48. list-style: none;
  49. }
  50. button {
  51. cursor: pointer;
  52. border: 0 none;
  53. }
  54. a:link, a:visited {
  55. text-decoration: none;
  56. -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
  57. }
  58. a:hover, a:active {
  59. text-decoration: none;
  60. }
  61. .hide {
  62. display: none;
  63. }
  64. .clearfix:after {
  65. visibility: hidden;
  66. display: block;
  67. font-size: 0;
  68. content: " ";
  69. clear: both;
  70. height: 0;
  71. }
  72. .clearfix {
  73. display: inline-table;
  74. }
  75. /* Hides from IE-mac \ */
  76. * html .clearfix {
  77. height: 1%;
  78. }
  79. .clearfix {
  80. display: block;
  81. }
  82. /* common */
  83. html, body, .page {
  84. position: absolute;
  85. top: 0;
  86. left: 0;
  87. width: 100%;
  88. height: 100%;
  89. overflow: hidden;
  90. }
  91. .grid {
  92. width: 640px;
  93. height: 960px;
  94. position: absolute;
  95. left: 50%;
  96. margin-left: -320px;
  97. top: 50%;
  98. margin-top: -480px;
  99. background-color: #fff;
  100. }
  101. #loading {
  102. background-color: #fff;
  103. font-size: 20px;
  104. z-index: 101;
  105. text-align: center;
  106. }
  107. #loading img {
  108. display: block;
  109. position: absolute;
  110. top: 0;
  111. left: 0;
  112. right: 0;
  113. bottom: 0;
  114. margin: auto;
  115. }
  116. #loading p {
  117. position: absolute;
  118. width: 100%;
  119. left: 0;
  120. bottom: 30px;
  121. }
  122. /* index */
  123. #index, #gameover {
  124. background-color: rgba(255, 255, 255, 1);
  125. z-index: 100;
  126. text-align: center;
  127. }
  128. #index p, #gameover p {
  129. line-height: 60px;
  130. font-size: 30px;
  131. }
  132. #index p em, #gameover p em {
  133. color: #ED4F30;
  134. font-weight: bold;
  135. padding: 0 5px;
  136. }
  137. .logo {
  138. display: block;
  139. width: 460px;
  140. margin: 130px auto 60px auto;
  141. }
  142. .start {
  143. width: 398px;
  144. }
  145. .copyright {
  146. width: 219px;
  147. height: 54px;
  148. position: absolute;
  149. left: 50%;
  150. margin-left: -110px;
  151. bottom: 110px;
  152. }
  153. #index {
  154. margin: 0 auto;
  155. }
  156. /* game */
  157. #apple {
  158. width: 144px;
  159. height: 120px;
  160. top: 50px;
  161. left: 50%;
  162. margin-left: -72px;
  163. position: absolute;
  164. -webkit-background-size: 100% 100%;
  165. background-size: 100% 100%;
  166. }
  167. .apple {
  168. background-image: url(../img/apple.png);
  169. }
  170. .apples {
  171. background-image: url(../img/apples.png);
  172. }
  173. #score {
  174. width: 50px;
  175. height: 40px;
  176. top: 50px;
  177. left: 60%;
  178. margin-left: 25px;
  179. position: absolute;
  180. font-size: 30px;
  181. }
  182. .people {
  183. width: 205px;
  184. height: 524px;
  185. margin: 0 auto;
  186. margin-top: 80px;
  187. background-image: url(../img/people.png);
  188. -webkit-background-size: 100% 100%;
  189. background-size: 100% 100%;
  190. }
  191. .arrow {
  192. width: 52px;
  193. height: 217px;
  194. bottom: 80px;
  195. position: absolute;
  196. background-image: url(../img/arrow.png);
  197. -webkit-background-size: 100% 100%;
  198. background-size: 100% 100%;
  199. position: absolute;
  200. left: 50%;
  201. margin-left: -26px;
  202. }
  203. .bow {
  204. width: 346px;
  205. height: 112px;
  206. bottom: 110px;
  207. left: 50%;
  208. margin-left: -173px;
  209. position: absolute;
  210. background-image: url(../img/bow.png);
  211. -webkit-background-size: 100% 100%;
  212. background-size: 100% 100%;
  213. }
  214. .barLifes {
  215. z-index: 1;
  216. position: absolute;
  217. width: 24px;
  218. height: 0px;
  219. left: 0px;
  220. bottom: 0px;
  221. background-color: #ff0000;
  222. }
  223. .progress {
  224. z-index: 2;
  225. width: 24px;
  226. height: 0px;
  227. bottom: 0;
  228. position: absolute;
  229. background-color: #D4D4D4;
  230. }
  231. .bar {
  232. width: 24px;
  233. height: 476px;
  234. border: 1px solid #8D8D8D;
  235. top: 10%;
  236. left: 90%;
  237. position: absolute;
  238. pointer-events: none;
  239. }
  240. .view-wrap #view {
  241. position: absolute;
  242. width: 100%;
  243. left: 0;
  244. }
  245. #time {
  246. background-color: rgba(150, 250, 57, 0.8);
  247. line-height: 60px;
  248. height: 60px;
  249. text-align: center;
  250. color: #fff;
  251. width: 160px;
  252. border-radius: 0 0 10px 10px;
  253. position: absolute;
  254. top: 0;
  255. left: 50%;
  256. margin-left: -80px;
  257. z-index: 10;
  258. font-size: 30px;
  259. }
  260. .view-wrap, #control {
  261. position: absolute;
  262. top: 0;
  263. left: 0;
  264. height: 100%;
  265. width: 100%;
  266. }
  267. #control div {
  268. width: 25%;
  269. height: 100%;
  270. float: left;
  271. cursor: pointer;
  272. }
  273. /* gameover */
  274. #gameover .info {
  275. margin-top: 15px;
  276. width: 640px;
  277. height: 500px;
  278. background-image: url(../img/win.png);
  279. -webkit-background-size: 100% 100%;
  280. background-size: 100% 100%;
  281. }
  282. #btn-restart {
  283. margin-top: 5px;
  284. width: 324px;
  285. height: 125px;
  286. margin: 0 auto;
  287. background-image: url(../img/retry.png);
  288. -webkit-background-size: 100% 100%;
  289. background-size: 100% 100%;
  290. }
  291. #btn-share {
  292. margin-top: 5px;
  293. width: 321px;
  294. height: 115px;
  295. margin: 0 auto;
  296. background-image: url(../img/share.png);
  297. -webkit-background-size: 100% 100%;
  298. background-size: 100% 100%;
  299. }
  300. #btn-more {
  301. margin-top: 5px;
  302. width: 324px;
  303. height: 125px;
  304. margin: 0 auto;
  305. background-image: url(../img/more.png);
  306. -webkit-background-size: 100% 100%;
  307. background-size: 100% 100%;
  308. }
  309. .fail-one {
  310. width: 322px;
  311. height: 498px;
  312. margin: 0 auto;
  313. margin-top: 70px;
  314. margin-left: 100px;
  315. margin-bottom: 30px;
  316. background-image: url(../img/fail_1.png);
  317. -webkit-background-size: 100% 100%;
  318. background-size: 100% 100%;
  319. }
  320. .fail-two {
  321. width: 246px;
  322. height: 504px;
  323. margin: 0 auto;
  324. margin-top: 70px;
  325. margin-bottom: 30px;
  326. background-image: url(../img/fail_2.png);
  327. -webkit-background-size: 100% 100%;
  328. background-size: 100% 100%;
  329. }
  330. .fail-three {
  331. width: 310px;
  332. height: 504px;
  333. margin: 0 auto;
  334. margin-top: 70px;
  335. margin-bottom: 30px;
  336. background-image: url(../img/fail_3.png);
  337. -webkit-background-size: 100% 100%;
  338. background-size: 100% 100%;
  339. }
  340. #share {
  341. position: fixed;
  342. top: 0;
  343. left: 0;
  344. width: 100%;
  345. height: 100%;
  346. background-color: rgba(0, 0, 0, 0.7);
  347. display: none;
  348. z-index: 110;
  349. }
  350. #share img {
  351. height: 150px;
  352. width: 180px;
  353. position: absolute;
  354. right: 0;
  355. top: 0;
  356. }
  357. #spn {
  358. position: fixed;
  359. left: 50% !important;
  360. margin-left: -160px;
  361. width: 320px;
  362. height: 50px;
  363. bottom: 0;
  364. z-index: 9999;
  365. }
  366. .hide {
  367. display: none;
  368. }
  369. .animated {
  370. -webkit-animation-duration: 1s;
  371. -ms-animation-duration: 1s;
  372. animation-duration: 1s;
  373. -webkit-animation-fill-mode: both;
  374. -ms-animation-fill-mode: both;
  375. animation-fill-mode: both;
  376. }
  377. @-webkit-keyframes fadeOut {
  378. 0% {
  379. opacity: 1;
  380. }
  381. 100% {
  382. opacity: 0;
  383. }
  384. }
  385. @keyframes fadeOut {
  386. 0% {
  387. opacity: 1;
  388. }
  389. 100% {
  390. opacity: 0;
  391. }
  392. }
  393. .fadeOut {
  394. -webkit-animation-name: fadeOut;
  395. animation-name: fadeOut;
  396. }