加载动画

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>
相关推荐
rzl027 小时前
HTML/JOSN复习总结
前端·html
Sapphire~1 天前
重学前端004 --- html 表单
前端·html
遇到困难睡大觉哈哈1 天前
CSS中的Element语法
前端·css
gzzeason1 天前
在HTML中CSS三种使用方式
前端·css·html
mrsk1 天前
🧙‍♂️ CSS中的结界术:BFC如何拯救你的布局混乱?
前端·css·面试
Zsnoin能1 天前
AI + TailwindCSS快速搭建一个属于自己的TailwindCSS学习网站
前端·css
Sapphire~1 天前
重学前端003 --- CSS 颜色
前端·css
慧一居士1 天前
CSS和CSS3区别对比
前端·css3
荔枝hu1 天前
springboot生成pdf方案之dot/html/图片转pdf三种方式
spring boot·pdf·html
爱电摇的小码农1 天前
【深度探究系列(5)】:前端开发打怪升级指南:从踩坑到封神的解决方案手册
前端·javascript·css·vue.js·node.js·html5·xss