index.vue 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  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. </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. height: 500px;
  53. position: relative;
  54. z-index: 0;
  55. .mb-video {
  56. width: 100%;
  57. height: auto;
  58. position: absolute;
  59. top: 20%;
  60. transform: translateY(-50%);
  61. left: 0;
  62. }
  63. .canvas-overlay {
  64. position: absolute;
  65. top: 18%;
  66. transform: translateY(-50%);
  67. left: 0;
  68. height: 80px;
  69. z-index: 1;
  70. }
  71. .mb-tabs-positioner {
  72. position: absolute;
  73. top: 56%;
  74. left: 0;
  75. transform: translateY(-50%);
  76. z-index: 1
  77. }
  78. }
  79. }
  80. </style>