index.vue 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  1. <template>
  2. <section class="mb-index">
  3. <section>
  4. <div class="mb-home-title">
  5. <h1>您专注业务,我们守护安全再强的攻击,也有攻不破的防线</h1>
  6. <p>高防服务器 | 高防DNS | 游戏盾SDK高防CDN 全方位守护您的业务</p>
  7. </div>
  8. <div class="mb-video-content">
  9. <video ref="videoRef" class="mb-video" preload="auto" :src="homeVideo" autoplay loop muted playsinline
  10. @loadedmetadata="onVideoLoaded"></video>
  11. <ParticlesCanvas :size="1" class="canvas-overlay" />
  12. <ProductTabs class="mb-tabs-positioner" />
  13. </div>
  14. </section>
  15. <PlansSection class="mb-plans-section" />
  16. </section>
  17. </template>
  18. <script setup>
  19. import homeVideo from '~/assets/video/home.webm'
  20. import ProductTabs from '~/components/mobile/home/ProductTabs.vue'
  21. import PlansSection from '~/components/mobile/home/PlansSection.vue'
  22. </script>
  23. <style scoped lang="scss">
  24. .mb-index {
  25. .mb-home-title {
  26. position: relative;
  27. margin-top: 20px;
  28. display: flex;
  29. flex-direction: column;
  30. align-items: center;
  31. gap: 8px;
  32. z-index: 1;
  33. h1 {
  34. text-align: center;
  35. width: 240px;
  36. font-size: 18px;
  37. font-weight: 500;
  38. line-height: 26px;
  39. background: linear-gradient(90deg, #7C4DFF 0.24%, #DEB9FF 45.03%, #617FFF 132.52%);
  40. background-clip: text;
  41. -webkit-background-clip: text;
  42. -webkit-text-fill-color: transparent;
  43. }
  44. p {
  45. color: rgba(255, 255, 255, 0.80);
  46. width: 184px;
  47. text-align: center;
  48. font-size: 12px;
  49. font-weight: 350;
  50. line-height: 20px;
  51. }
  52. }
  53. .mb-video-content {
  54. height: 500px;
  55. position: relative;
  56. z-index: 0;
  57. .mb-video {
  58. width: 100%;
  59. height: auto;
  60. position: absolute;
  61. top: 20%;
  62. transform: translateY(-50%);
  63. left: 0;
  64. }
  65. .canvas-overlay {
  66. position: absolute;
  67. top: 18%;
  68. transform: translateY(-50%);
  69. left: 0;
  70. height: 80px;
  71. z-index: 1;
  72. }
  73. .mb-tabs-positioner {
  74. position: absolute;
  75. top: 56%;
  76. left: 0;
  77. transform: translateY(-50%);
  78. z-index: 1
  79. }
  80. }
  81. .mb-plans-section {
  82. margin-top: 18px;
  83. padding-bottom: 20px;
  84. }
  85. }
  86. </style>