christmas.vue 8.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324
  1. <template>
  2. <div class="christmas" v-if="hasOpen">
  3. <div class="christmas-modal">
  4. <div class="christmas-info" v-if="!hasNewYear">
  5. <a href="https://www.usoftmall.com/activity/business" target="_blank"></a>
  6. <a href="javascript:void(0)" @click="close">×</a>
  7. <div class="christmas-img">
  8. <img src="/images/christmas/christmas1.png">
  9. <img src="/images/christmas/christmas2.png">
  10. <img src="/images/christmas/christmas4.png">
  11. </div>
  12. </div>
  13. <div class="festival-info" v-if="hasNewYear">
  14. <div class="festival-img">
  15. <img src="/images/christmas/festival_bg.png">
  16. <img src="/images/christmas/festival_deng1.png">
  17. <img src="/images/christmas/festival_deng2.png">
  18. <img src="/images/christmas/festival_deng1.png">
  19. <img src="/images/christmas/festival_deng2.png">
  20. <img src="/images/christmas/festival2.gif">
  21. <img src="/images/christmas/festival1.gif">
  22. </div>
  23. <a href="https://www.usoftmall.com/activity/business" target="_blank">马上开店</a>
  24. <a @click="close">立刻购买</a>
  25. <!--<a href="javascript:void(0)" @click="close">×</a>-->
  26. </div>
  27. </div>
  28. </div>
  29. </template>
  30. <script>
  31. export default {
  32. name: 'christmas',
  33. props: ['hasNewYear'],
  34. data () {
  35. return {
  36. hasOpen: true
  37. }
  38. },
  39. methods: {
  40. close () {
  41. this.hasOpen = false
  42. this.$emit('listenopen')
  43. }
  44. }
  45. }
  46. </script>
  47. <style scoped>
  48. .christmas{
  49. position:fixed;
  50. top:0;
  51. left:0;
  52. z-index:10000;
  53. width:100%;
  54. height:100%;
  55. }
  56. .christmas-modal{
  57. background:rgba(0,0,0,.6);
  58. width:100%;
  59. height:100%;
  60. }
  61. .christmas-info{
  62. position:absolute;
  63. top:50%;
  64. left:50%;
  65. transform: translate(-50%, -50%);
  66. width:985px;
  67. height:740px;
  68. }
  69. .festival-info{
  70. position:absolute;
  71. top:50%;
  72. left:50%;
  73. transform: translate(-50%, -50%);
  74. width:683px;
  75. height:613px;
  76. }
  77. .christmas-info a, .festival-info a{
  78. position:relative;
  79. z-index:100000;
  80. display:block;
  81. width:190px;
  82. height:52px;
  83. line-height: 52px;
  84. text-align: center;
  85. }
  86. .festival-info a:nth-child(2){
  87. top:566px;
  88. left:123px;
  89. font-size: 28px;
  90. font-weight: bold;
  91. animation: newYearBtn .2s infinite;
  92. -moz-animation: newYearBtn .2s infinite;
  93. -o-animation: newYearBtn .2s infinite;
  94. -webkit-animation: newYearBtn .2s infinite;
  95. }
  96. .festival-info a:nth-child(3){
  97. top:514px;
  98. left:369px;
  99. font-size: 28px;
  100. font-weight: bold;
  101. animation: newYearBtn .2s .1s infinite;
  102. -moz-animation: newYearBtn .2s .1s infinite;
  103. -o-animation: newYearBtn .2s .1s infinite;
  104. -webkit-animation: newYearBtn .2s .1s infinite;
  105. }
  106. .christmas-info a:first-child{
  107. top:72%;
  108. left:39%;
  109. width:200px;
  110. height:50px;
  111. background: url('/images/christmas/btn.png')no-repeat center center;
  112. animation: christmas1 1s linear infinite;
  113. -o-animation: christmas1 1s linear infinite;
  114. -webkit-animation: christmas1 1s linear infinite;
  115. -moz-animation: christmas1 1s linear infinite;
  116. }
  117. .christmas-info a:first-child:hover{
  118. animation: none;
  119. cursor:pointer;
  120. }
  121. .christmas-info a:nth-child(2){
  122. top:8%;
  123. left:85%;
  124. width: 36px;
  125. height: 36px;
  126. font-size: 48px;
  127. line-height: 28px;
  128. text-align: center;
  129. color: #8a8a8a;
  130. background: #f6f6f6;
  131. border-radius: 50%;
  132. }
  133. .christmas-info .christmas-img img{
  134. position:absolute;
  135. top:50%;
  136. left:50%;
  137. transform: translate(-50%, -50%);
  138. }
  139. .festival-info .festival-img{
  140. position:relative;
  141. }
  142. .festival-info .festival-img img{
  143. position:absolute;
  144. }
  145. .festival-info .festival-img img:nth-child(2){
  146. top:219px;
  147. left:-35px;
  148. -webkit-transform-origin: top center;
  149. -moz-transform-origin: top center;
  150. -ms-transform-origin: top center;
  151. -o-transform-origin: top center;
  152. transform-origin: top center;
  153. animation:newYearImg 5s linear 2.5s infinite
  154. }
  155. .festival-info .festival-img img:nth-child(3){
  156. top:80px;
  157. left:17px;
  158. -webkit-transform-origin: top center;
  159. -moz-transform-origin: top center;
  160. -ms-transform-origin: top center;
  161. -o-transform-origin: top center;
  162. transform-origin: top center;
  163. animation:newYearImg 5s linear 2.5s infinite
  164. }
  165. .festival-info .festival-img img:nth-child(4){
  166. top:219px;
  167. left:641px;
  168. -webkit-transform-origin: top center;
  169. -moz-transform-origin: top center;
  170. -ms-transform-origin: top center;
  171. -o-transform-origin: top center;
  172. transform-origin: top center;
  173. animation:newYearImg 5s linear infinite;
  174. -o-animation:newYearImg 5s linear infinite;
  175. -moz-animation:newYearImg 5s linear infinite;
  176. -webkit-animation:newYearImg 5s linear infinite;
  177. }
  178. .festival-info .festival-img img:nth-child(5){
  179. top:80px;
  180. left:613px;
  181. -webkit-transform-origin: top center;
  182. -moz-transform-origin: top center;
  183. -ms-transform-origin: top center;
  184. -o-transform-origin: top center;
  185. transform-origin: top center;
  186. animation:newYearImg 5s linear infinite;
  187. -o-animation:newYearImg 5s linear infinite;
  188. -moz-animation:newYearImg 5s linear infinite;
  189. -webkit-animation:newYearImg 5s linear infinite;
  190. }
  191. .festival-info .festival-img img:nth-child(6){
  192. top:-165px;
  193. left:615px;
  194. }
  195. .festival-info .festival-img img:nth-child(7){
  196. top:495px;
  197. left:-105px;
  198. }
  199. .christmas-info .christmas-img img:nth-child(2){
  200. animation: christmas2 25s infinite;
  201. -moz-animation: christmas2 25s infinite;
  202. -o-animation: christmas2 25s infinite;
  203. -webkit-animation: christmas2 25s infinite;
  204. }
  205. .christmas-info .christmas-img img:nth-child(3){
  206. animation: christmas3 30s infinite;
  207. -o-animation: christmas3 30s infinite;
  208. -webkit-animation: christmas3 30s infinite;
  209. -moz-animation: christmas3 30s infinite;
  210. }
  211. @keyframes christmas1 {
  212. 0%{top:72%}
  213. 25%{top:71.9%}
  214. 50%{top:72.9%}
  215. 75%{top:71.9%}
  216. 100%{top:72%}
  217. }
  218. @keyframes christmas2 {
  219. 0%{top:40%;left:50%;opacity: 0}
  220. 25%{left:48%;opacity: 1}
  221. 50%{left:53%}
  222. 75%{left:48%; opacity: 1}
  223. 100%{top:45%;left:50%;opacity: 0}
  224. }
  225. @keyframes christmas3 {
  226. 0%{top:20%;left:50%;opacity: 0}
  227. 25%{left:48%;opacity: 1}
  228. 50%{left:53%}
  229. 75%{left:48%; opacity: 1}
  230. 100%{top:30%;left:50%;opacity: 0}
  231. }
  232. @-moz-keyframes christmas1 {
  233. 0%{top:72%}
  234. 25%{top:71.9%}
  235. 50%{top:72.9%}
  236. 75%{top:71.9%}
  237. 100%{top:72%}
  238. }
  239. @-moz-keyframes christmas2 {
  240. 0%{top:40%;left:50%;opacity: 0}
  241. 25%{left:48%;opacity: 1}
  242. 50%{left:53%}
  243. 75%{left:48%; opacity: 1}
  244. 100%{top:45%;left:50%;opacity: 0}
  245. }
  246. @-moz-keyframes christmas3 {
  247. 0%{top:20%;left:50%;opacity: 0}
  248. 25%{left:48%;opacity: 1}
  249. 50%{left:53%}
  250. 75%{left:48%; opacity: 1}
  251. 100%{top:30%;left:50%;opacity: 0}
  252. }
  253. @-webkit-keyframes christmas1 {
  254. 0%{top:72%}
  255. 25%{top:71.9%}
  256. 50%{top:72.9%}
  257. 75%{top:71.9%}
  258. 100%{top:72%}
  259. }
  260. @-webkit-keyframes christmas2 {
  261. 0%{top:40%;left:50%;opacity: 0}
  262. 25%{left:48%;opacity: 1}
  263. 50%{left:53%}
  264. 75%{left:48%; opacity: 1}
  265. 100%{top:45%;left:50%;opacity: 0}
  266. }
  267. @-webkit-keyframes christmas3 {
  268. 0%{top:20%;left:50%;opacity: 0}
  269. 25%{left:48%;opacity: 1}
  270. 50%{left:53%}
  271. 75%{left:48%; opacity: 1}
  272. 100%{top:30%;left:50%;opacity: 0}
  273. }
  274. @-o-keyframes christmas1 {
  275. 0%{top:72%}
  276. 25%{top:71.9%}
  277. 50%{top:72.9%}
  278. 75%{top:71.9%}
  279. 100%{top:72%}
  280. }
  281. @-o-keyframes christmas2 {
  282. 0%{top:40%;left:50%;opacity: 0}
  283. 25%{left:48%;opacity: 1}
  284. 50%{left:53%}
  285. 75%{left:48%; opacity: 1}
  286. 100%{top:45%;left:50%;opacity: 0}
  287. }
  288. @-o-keyframes christmas3 {
  289. 0%{top:20%;left:50%;opacity: 0}
  290. 25%{left:48%;opacity: 1}
  291. 50%{left:53%}
  292. 75%{left:48%; opacity: 1}
  293. 100%{top:30%;left:50%;opacity: 0}
  294. }
  295. @keyframes newYearBtn {
  296. 0%{color:#000}
  297. 50%{color:#fe0000;}
  298. 100%{color:#000}
  299. }
  300. @-o-keyframes newYearBtn {
  301. 0%{color:#000}
  302. 50%{color:#fe0000;}
  303. 100%{color:#000}
  304. }
  305. @-moz-keyframes newYearBtn {
  306. 0%{color:#000}
  307. 50%{color:#fe0000;}
  308. 100%{color:#000}
  309. }
  310. @-webkit-keyframes newYearBtn {
  311. 0%{color:#000;}
  312. 50%{color:#fe0000;}
  313. 100%{color:#000;}
  314. }
  315. @keyframes newYearImg {
  316. 0%{transform: rotate(0deg);}
  317. 25%{transform: rotate(-30deg);}
  318. 50%{transform: rotate(0deg);}
  319. 75%{transform: rotate(30deg);}
  320. 100%{transform: rotate(0deg);}
  321. }
  322. </style>