加载动画

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>
相关推荐
前端Hardy1 小时前
HTML&CSS:一眼心动的 SVG 时钟
前端·javascript·css
TTGGGFF1 小时前
Streamlit:CSS——从基础到实战美化应用
前端·css
Hilaku3 小时前
重新思考CSS Reset:normalize.css vs reset.css vs remedy.css,在2025年该如何选?
前端·css·代码规范
Darenm1114 小时前
深入理解CSS BFC:块级格式化上下文
前端·css
小白64024 小时前
前端梳理体系从常问问题去完善-框架篇(react生态)
前端·css·html·reactjs
吃饺子不吃馅5 小时前
大家都在找的手绘/素描风格图编辑器它它它来了
前端·javascript·css
Zhencode5 小时前
CSS变量的应用
前端·css
又是忙碌的一天16 小时前
前端学习day01
前端·学习·html
Joker Zxc16 小时前
【前端基础】20、CSS属性——transform、translate、transition
前端·css
不会算法的小灰17 小时前
HTML简单入门—— 基础标签与路径解析
前端·算法·html