加载动画

html 复制代码
<template>
<div class="content-wrapper" v-if="true" style="overflow: hidden;">
  <div class="progress content" style=' height: 497.5px; margin: 0px auto;'>
    <div class="content">
      <div class="light"></div>
    </div>
  </div>
</div>
</template>
<style lang="scss" scoped>
.content-wrapper {
  width: 100%;
  height: auto;
  .progress{
    &.content{
      background-color: var(--chat_background);
    }
  }
}
.progress {
  .inner {
    position: absolute;
    bottom: 24px;
    left: 24px;
    z-index: 2;

    .tip {
      font-size: 12px;
      line-height: 18px;
      margin-top: 4px;
      width: 100%;
      text-overflow: ellipsis;
      overflow: hidden;
      white-space: nowrap;
    }

    .progress-box {
      margin-bottom: 16px;
      gap: 8px;
    }


    .purchase {
      background-clip: text;
      -webkit-background-clip: text;
      -webkit-text-fill-color: transparent;
      font-size: 12px;
      font-weight: 400;
      line-height: 22px;
      margin-top: 16px;
    }
  }

  .content {
    // background-color: ;
    height: 100%;
    font-size: 14px;
    position: relative;
    padding: 0 12px;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2;
    width: 100%;

    .light {
      width: 240px;
      height: 100%;
      background: linear-gradient(270deg, rgba(163, 151, 235, 0.281), rgba(255, 255, 255, 0));
      position: absolute;
      animation: lightAnimation-febef47d 1.8s .3s infinite ease-in-out;
    }
  }
}
@keyframes lightAnimation-febef47d {
  0% {
    left: -240px;
  }

  100% {
    left: 100%;
  }
}

</style>
相关推荐
孟祥_成都1 小时前
前端下午茶:这 3 个网页特效建议收藏(送源码)
前端·javascript·css
小璐资源网2 小时前
CSS进阶指南:深入解析选择器优先级与继承机制
前端·css
ZHOUPUYU3 小时前
PHP性能分析与调优:从定位瓶颈到实战优化
开发语言·后端·html·php
weixin_462901973 小时前
ESP32电压显示
开发语言·javascript·css·python
Dxy12393102164 小时前
HTML常用布局详解:从基础到进阶的网页结构指南
前端·html
Dxy123931021616 小时前
CSS常用样式详解:从基础到进阶的全面指南
前端·css
爱敲代码的菜菜17 小时前
【测试】自动化测试
css·selenium·测试工具·junit·自动化·xpath
柒.梧.20 小时前
Redis通用命令+五大核心数据结构
前端·bootstrap·html
酉鬼女又兒21 小时前
入门前端CSS 媒体查询全解析:从入门到精通,打造完美响应式布局(可用于备赛蓝桥杯Web应用开发)
前端·css·职场和发展·蓝桥杯·前端框架·html5·媒体
Dxy12393102161 天前
HTML常用标签详解
前端·html