christmas.vue 9.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362
  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="/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/festival_yanhuaright.gif">
  21. <img src="/images/christmas/festival_yanhualeft.gif">
  22. </div>
  23. <a href="/activity/business" target="_blank">马上开店</a>
  24. <a href="https://account.ubtob.com/sso/login?returnURL=https%253A%252F%252Fmall.usoftchina.com%252F&appId=mall&baseUrl=https%3A%2F%2Fmall.usoftchina.com%2Flogin%2Fother" target="_blank">立刻购买</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. .festival-info a:nth-child(4){
  107. top:447px;
  108. left:630px;
  109. width: 45px;
  110. height: 45px;
  111. background: url('/images/christmas/close.png')no-repeat center center;
  112. }
  113. .christmas-info a:first-child{
  114. top:72%;
  115. left:39%;
  116. width:200px;
  117. height:50px;
  118. background: url('/images/christmas/btn.png')no-repeat center center;
  119. animation: christmas1 1s linear infinite;
  120. -o-animation: christmas1 1s linear infinite;
  121. -webkit-animation: christmas1 1s linear infinite;
  122. -moz-animation: christmas1 1s linear infinite;
  123. }
  124. .christmas-info a:first-child:hover{
  125. animation: none;
  126. cursor:pointer;
  127. }
  128. .christmas-info a:nth-child(2){
  129. top:8%;
  130. left:85%;
  131. width: 45px;
  132. height: 45px;
  133. background: url('/images/christmas/close.png')no-repeat center center;
  134. }
  135. .christmas-info .christmas-img img{
  136. position:absolute;
  137. top:50%;
  138. left:50%;
  139. transform: translate(-50%, -50%);
  140. }
  141. .festival-info .festival-img{
  142. position:relative;
  143. }
  144. .festival-info .festival-img img{
  145. position:absolute;
  146. }
  147. .festival-info .festival-img img:nth-child(2){
  148. top:219px;
  149. left:-35px;
  150. -webkit-transform-origin: top center;
  151. -moz-transform-origin: top center;
  152. -ms-transform-origin: top center;
  153. -o-transform-origin: top center;
  154. transform-origin: top center;
  155. animation:newYearImg 7s linear 3.5s infinite;
  156. -o-animation:newYearImg 7s linear 3.5s infinite;
  157. -webkit-animation:newYearImg 7s linear 3.5s infinite;
  158. -moz-animation:newYearImg 7s linear 3.5s infinite;
  159. }
  160. .festival-info .festival-img img:nth-child(3){
  161. top:80px;
  162. left:17px;
  163. -webkit-transform-origin: top center;
  164. -moz-transform-origin: top center;
  165. -ms-transform-origin: top center;
  166. -o-transform-origin: top center;
  167. transform-origin: top center;
  168. animation:newYearImg 5s linear 2.5s infinite;
  169. -o-animation:newYearImg 5s linear 2.5s infinite;
  170. -webkit-animation:newYearImg 5s linear 2.5s infinite;
  171. -moz-animation:newYearImg 5s linear 2.5s infinite;
  172. }
  173. .festival-info .festival-img img:nth-child(4){
  174. top:219px;
  175. left:641px;
  176. -webkit-transform-origin: top center;
  177. -moz-transform-origin: top center;
  178. -ms-transform-origin: top center;
  179. -o-transform-origin: top center;
  180. transform-origin: top center;
  181. animation:newYearImg 7s linear infinite;
  182. -o-animation:newYearImg 7s linear infinite;
  183. -moz-animation:newYearImg 7s linear infinite;
  184. -webkit-animation:newYearImg 7s linear infinite;
  185. }
  186. .festival-info .festival-img img:nth-child(5){
  187. top:80px;
  188. left:613px;
  189. -webkit-transform-origin: top center;
  190. -moz-transform-origin: top center;
  191. -ms-transform-origin: top center;
  192. -o-transform-origin: top center;
  193. transform-origin: top center;
  194. animation:newYearImg 5s linear infinite;
  195. -o-animation:newYearImg 5s linear infinite;
  196. -moz-animation:newYearImg 5s linear infinite;
  197. -webkit-animation:newYearImg 5s linear infinite;
  198. }
  199. .festival-info .festival-img img:nth-child(6){
  200. top:-165px;
  201. left:615px;
  202. opacity:.75;
  203. /*animation: newYearYanHua 5s infinite;*/
  204. }
  205. .festival-info .festival-img img:nth-child(7){
  206. top:420px;
  207. left:-105px;
  208. opacity:.75;
  209. /*animation: newYearYanHua 5s 1s infinite;*/
  210. }
  211. .christmas-info .christmas-img img:nth-child(2){
  212. animation: christmas2 25s infinite;
  213. -moz-animation: christmas2 25s infinite;
  214. -o-animation: christmas2 25s infinite;
  215. -webkit-animation: christmas2 25s infinite;
  216. }
  217. .christmas-info .christmas-img img:nth-child(3){
  218. animation: christmas3 30s infinite;
  219. -o-animation: christmas3 30s infinite;
  220. -webkit-animation: christmas3 30s infinite;
  221. -moz-animation: christmas3 30s infinite;
  222. }
  223. @keyframes christmas1 {
  224. 0%{top:72%}
  225. 25%{top:71.9%}
  226. 50%{top:72.9%}
  227. 75%{top:71.9%}
  228. 100%{top:72%}
  229. }
  230. @keyframes christmas2 {
  231. 0%{top:40%;left:50%;opacity: 0}
  232. 25%{left:48%;opacity: 1}
  233. 50%{left:53%}
  234. 75%{left:48%; opacity: 1}
  235. 100%{top:45%;left:50%;opacity: 0}
  236. }
  237. @keyframes christmas3 {
  238. 0%{top:20%;left:50%;opacity: 0}
  239. 25%{left:48%;opacity: 1}
  240. 50%{left:53%}
  241. 75%{left:48%; opacity: 1}
  242. 100%{top:30%;left:50%;opacity: 0}
  243. }
  244. @-moz-keyframes christmas1 {
  245. 0%{top:72%}
  246. 25%{top:71.9%}
  247. 50%{top:72.9%}
  248. 75%{top:71.9%}
  249. 100%{top:72%}
  250. }
  251. @-moz-keyframes christmas2 {
  252. 0%{top:40%;left:50%;opacity: 0}
  253. 25%{left:48%;opacity: 1}
  254. 50%{left:53%}
  255. 75%{left:48%; opacity: 1}
  256. 100%{top:45%;left:50%;opacity: 0}
  257. }
  258. @-moz-keyframes christmas3 {
  259. 0%{top:20%;left:50%;opacity: 0}
  260. 25%{left:48%;opacity: 1}
  261. 50%{left:53%}
  262. 75%{left:48%; opacity: 1}
  263. 100%{top:30%;left:50%;opacity: 0}
  264. }
  265. @-webkit-keyframes christmas1 {
  266. 0%{top:72%}
  267. 25%{top:71.9%}
  268. 50%{top:72.9%}
  269. 75%{top:71.9%}
  270. 100%{top:72%}
  271. }
  272. @-webkit-keyframes christmas2 {
  273. 0%{top:40%;left:50%;opacity: 0}
  274. 25%{left:48%;opacity: 1}
  275. 50%{left:53%}
  276. 75%{left:48%; opacity: 1}
  277. 100%{top:45%;left:50%;opacity: 0}
  278. }
  279. @-webkit-keyframes christmas3 {
  280. 0%{top:20%;left:50%;opacity: 0}
  281. 25%{left:48%;opacity: 1}
  282. 50%{left:53%}
  283. 75%{left:48%; opacity: 1}
  284. 100%{top:30%;left:50%;opacity: 0}
  285. }
  286. @-o-keyframes christmas1 {
  287. 0%{top:72%}
  288. 25%{top:71.9%}
  289. 50%{top:72.9%}
  290. 75%{top:71.9%}
  291. 100%{top:72%}
  292. }
  293. @-o-keyframes christmas2 {
  294. 0%{top:40%;left:50%;opacity: 0}
  295. 25%{left:48%;opacity: 1}
  296. 50%{left:53%}
  297. 75%{left:48%; opacity: 1}
  298. 100%{top:45%;left:50%;opacity: 0}
  299. }
  300. @-o-keyframes christmas3 {
  301. 0%{top:20%;left:50%;opacity: 0}
  302. 25%{left:48%;opacity: 1}
  303. 50%{left:53%}
  304. 75%{left:48%; opacity: 1}
  305. 100%{top:30%;left:50%;opacity: 0}
  306. }
  307. @keyframes newYearBtn {
  308. 0%{color:#000}
  309. 50%{color:#fe0000;}
  310. 100%{color:#000}
  311. }
  312. @-o-keyframes newYearBtn {
  313. 0%{color:#000}
  314. 50%{color:#fe0000;}
  315. 100%{color:#000}
  316. }
  317. @-moz-keyframes newYearBtn {
  318. 0%{color:#000}
  319. 50%{color:#fe0000;}
  320. 100%{color:#000}
  321. }
  322. @-webkit-keyframes newYearBtn {
  323. 0%{color:#000;}
  324. 50%{color:#fe0000;}
  325. 100%{color:#000;}
  326. }
  327. @keyframes newYearImg {
  328. 0%{transform: rotate(0deg);}
  329. 25%{transform: rotate(-15deg);}
  330. 50%{transform: rotate(0deg);}
  331. 75%{transform: rotate(15deg);}
  332. 100%{transform: rotate(0deg);}
  333. }
  334. @-o-keyframes newYearImg {
  335. 0%{transform: rotate(0deg);}
  336. 25%{transform: rotate(-15deg);}
  337. 50%{transform: rotate(0deg);}
  338. 75%{transform: rotate(15deg);}
  339. 100%{transform: rotate(0deg);}
  340. }
  341. @-webkit-keyframes newYearImg {
  342. 0%{transform: rotate(0deg);}
  343. 25%{transform: rotate(-15deg);}
  344. 50%{transform: rotate(0deg);}
  345. 75%{transform: rotate(15deg);}
  346. 100%{transform: rotate(0deg);}
  347. }
  348. @-moz-keyframes newYearImg {
  349. 0%{transform: rotate(0deg);}
  350. 25%{transform: rotate(-15deg);}
  351. 50%{transform: rotate(0deg);}
  352. 75%{transform: rotate(15deg);}
  353. 100%{transform: rotate(0deg);}
  354. }
  355. @keyframes newYearYanHua {
  356. 0%{opacity:1;transform:scale(0);}
  357. 26%{opacity:1;transform:scale(.7);}
  358. 100%{transform:scale(1);opacity:0;}
  359. }
  360. </style>