index.vue 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  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 />
  13. </div>
  14. </section>
  15. </section>
  16. </template>
  17. <script setup>
  18. import homeVideo from '~/assets/video/home.webm'
  19. import ProductTabs from '~/components/mobile/home/ProductTabs.vue';
  20. </script>
  21. <style scoped lang="scss">
  22. .mb-index {
  23. .mb-home-title {
  24. position: relative;
  25. margin-top: 20px;
  26. display: flex;
  27. flex-direction: column;
  28. align-items: center;
  29. gap: 8px;
  30. z-index: 1;
  31. h1 {
  32. text-align: center;
  33. width: 240px;
  34. font-size: 18px;
  35. font-weight: 500;
  36. line-height: 26px;
  37. background: linear-gradient(90deg, #7C4DFF 0.24%, #DEB9FF 45.03%, #617FFF 132.52%);
  38. background-clip: text;
  39. -webkit-background-clip: text;
  40. -webkit-text-fill-color: transparent;
  41. }
  42. p {
  43. color: rgba(255, 255, 255, 0.80);
  44. width: 184px;
  45. text-align: center;
  46. font-size: 12px;
  47. font-weight: 350;
  48. line-height: 20px;
  49. }
  50. }
  51. .mb-video-content {
  52. position: relative;
  53. margin-top: -10%;
  54. z-index: 0;
  55. .mb-video {
  56. width: 100%;
  57. height: auto;
  58. }
  59. .canvas-overlay {
  60. position: absolute;
  61. top: 40%;
  62. transform: translateY(-50%);
  63. left: 0;
  64. height: 80px;
  65. }
  66. }
  67. }
  68. </style>