加载动画

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 小时前
CSS 特殊符号 / 英文导致换行问题速查表
css
Komorebi゛1 小时前
【CSS】斜角流光样式
前端·css
Irene19911 小时前
CSS 废弃属性分类总结
前端·css
沉默璇年7 小时前
如何通过python脚本下载高德离线底图瓦片并使用?
javascript·python·html
San30.7 小时前
告别全局污染:深入解析现代前端的模块化 CSS 演进之路
前端·css·vue.js·react.js
BianHuanShiZhe8 小时前
swift计算文本高度
前端·javascript·html
23级二本计科8 小时前
前端 HTML + CSS + JavaScript
前端·css·html
xuedaobian8 小时前
Markdown 宽表格突破容器边界滚动方案
前端·css
VekiSon9 小时前
综合项目实战——电子商城信息查询系统
linux·c语言·网络·http·html·tcp·sqlite3
AI前端老薛9 小时前
CSS实现动画的几种方式
前端·css