spa.css 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170
  1. /**
  2. * desc: spa框架样式
  3. * author: justin
  4. * date: 2015-05-14
  5. */
  6. html {
  7. height: 100%;
  8. }
  9. body {
  10. position: relative;
  11. margin: 0;
  12. padding: 0;
  13. width: 100%;
  14. height: 100%;
  15. overflow: hidden;
  16. }
  17. .spa-fullscreen {
  18. position: absolute;
  19. left: 0;
  20. top: 0;
  21. margin: 0;
  22. padding: 0;
  23. width: 100%;
  24. visibility: hidden;
  25. overflow: hidden;
  26. z-index: -1;
  27. }
  28. .spa-page {
  29. position: absolute;
  30. left: 0;
  31. top: 0;
  32. bottom: 0;
  33. right: 0;
  34. margin: 0;
  35. padding: 0;
  36. overflow: hidden;
  37. z-index: 2000;
  38. -webkit-transform: translateZ(0);
  39. -webkit-backface-visibility: hidden;
  40. -webkit-transform-style: preserve-3d;
  41. }
  42. .spa-page-bg {
  43. position: absolute;
  44. left: 0;
  45. top: 0;
  46. bottom: 0;
  47. right: 0;
  48. margin: 0;
  49. padding: 0;
  50. }
  51. .spa-page-body {
  52. position: absolute;
  53. left: 0;
  54. top: 0;
  55. bottom: 0;
  56. right: 0;
  57. margin: 0;
  58. padding: 0;
  59. overflow: hidden;
  60. -webkit-transform: translateZ(0);
  61. -webkit-backface-visibility: hidden;
  62. -webkit-transform-style: preserve-3d;
  63. }
  64. .spa-scroll {
  65. overflow: auto;
  66. }
  67. .spa-scroll-touch {
  68. -webkit-overflow-scrolling: touch;
  69. }
  70. .spa-scroll-x {
  71. overflow-y: hidden;
  72. }
  73. .spa-scroll-y {
  74. overflow-x: hidden;
  75. }
  76. .spa-cover {
  77. display: none;
  78. position: absolute;
  79. left: 0;
  80. right: 0;
  81. top: 0;
  82. bottom: 0;
  83. text-align: center;
  84. z-index: 5000;
  85. }
  86. .spa-loader {
  87. position: absolute;
  88. left: 0;
  89. right: 0;
  90. top: 0;
  91. bottom: 0;
  92. text-align: center;
  93. overflow: hidden;
  94. z-index: 5001;
  95. }
  96. .spa-loader-animate {
  97. position: absolute;
  98. top: 50%;
  99. left: 50%;
  100. }
  101. .spa-loader-animate .bg {
  102. position: absolute;
  103. width: 64px;
  104. height: 64px;
  105. margin: 0 auto;
  106. top: -32px;
  107. left: -32px;
  108. border-radius: 50%;
  109. background: #2C3E50;
  110. opacity: 0.5;
  111. }
  112. .spa-loader-animate .ball {
  113. display: block;
  114. float: left;
  115. padding: 8px;
  116. margin-top: -8px;
  117. margin-left: -10px;
  118. -webkit-border-radius: 50%;
  119. -moz-border-radius: 50%;
  120. -ms-border-radius: 50%;
  121. -o-border-radius: 50%;
  122. border-radius: 50%;
  123. }
  124. .spa-loader-animate span:nth-child(2) {
  125. background: #16A085;
  126. -webkit-animation: move-left 800ms ease-in-out infinite alternate;
  127. -moz-animation: move-left 800ms ease-in-out infinite alternate;
  128. -ms-animation: move-left 800ms ease-in-out infinite alternate;
  129. -animation: move-left 800ms ease-in-out infinite alternate;
  130. }
  131. .spa-loader-animate .ball:nth-child(3) {
  132. background: #E67E22;
  133. -webkit-animation: move-right 800ms ease-in-out infinite alternate;
  134. -moz-animation: move-right 800ms ease-in-out infinite alternate;
  135. -ms-animation: move-right 800ms ease-in-out infinite alternate;
  136. animation: move-right 800ms ease-in-out infinite alternate;
  137. }
  138. @-webkit-keyframes move-left {
  139. to {
  140. -webkit-transform: translate(20px, 0);
  141. transform: translate(20px, 0);
  142. background: #e85932;
  143. }
  144. }
  145. @-webkit-keyframes move-right {
  146. to {
  147. -webkit-transform: translate(-20px, 0);
  148. transform: translate(-20px, 0);
  149. background: #44bbcc;
  150. }
  151. }