P2.vue 2.1KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  1. <template>
  2. <div class="p2-box">
  3. <div class="content-right">
  4. <img
  5. class="main-img animate__animated animate__rotateIn"
  6. style="animation-delay: 1.5s"
  7. src="/images/pg1/honour.png"
  8. alt=""
  9. @click="emit('clickImg', $event)"
  10. >
  11. <div class="back-line">
  12. <img src="/images/pg1/line2.png" alt="">
  13. </div>
  14. </div>
  15. <div class="content-left txt">
  16. <p class="animate__animated animate__fadeInRight" style="text-align: right; animation-delay: 2s">
  17. <strong>近20万枚</strong> <br>
  18. 紫金草徽章 <br>
  19. 佩戴在了人们的心口
  20. </p>
  21. </div>
  22. </div>
  23. </template>
  24. <script setup>
  25. const emit = defineEmits(['clickImg']);
  26. </script>
  27. <style lang="less" scoped>
  28. .p2-box {
  29. position: relative;
  30. .content-right {
  31. position: relative;
  32. .main-img {
  33. width: 30vw;
  34. height: 30vw;
  35. position: relative;
  36. margin-left: auto;
  37. margin-right: 0;
  38. z-index: 10;
  39. }
  40. .back-line {
  41. position: absolute;
  42. z-index: 0;
  43. right: -4vw;
  44. bottom: -10vw;
  45. img {
  46. width: auto;
  47. height: 24.7vw;
  48. position: relative;
  49. z-index: 0;
  50. }
  51. &::after {
  52. content: '';
  53. position: absolute;
  54. top: 0;
  55. left: 0;
  56. width: 100%;
  57. height: 100%;
  58. background-image: url('/images/BG.jpg');
  59. background-size: 100% 100%;
  60. background-repeat: no-repeat;
  61. transform-origin: bottom center;
  62. animation-name: erasure;
  63. animation-duration: 1s;
  64. animation-delay: 2.5s;
  65. animation-timing-function: cubic-bezier(0.07, 0.85, 0.18, 0.96);
  66. animation-fill-mode: forwards;
  67. z-index: 10;
  68. }
  69. @keyframes erasure {
  70. from {
  71. transform: scaleY(100%);
  72. }
  73. to {
  74. transform: scaleY(0);
  75. }
  76. }
  77. }
  78. }
  79. .content-left {
  80. position: absolute;
  81. width: calc(100% - 34vw);
  82. height: 100%;
  83. right: 34vw;
  84. top: 0;
  85. display: flex;
  86. justify-content: right;
  87. align-items: center;
  88. }
  89. }
  90. </style>