加载动画

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
莯炗1 小时前
CSS知识补充 --- 控制继承
前端·css·css继承·css控制继承
Nicander2 小时前
【CSS技巧】给按钮添加下划线动画
css
前端小菜鸟吖4 小时前
2025年最新版HTML5超完整教程
前端·html
NicoNico4 小时前
Wordle:为逗女友而爆火的小游戏
前端·html
小公主5 小时前
CSS盒模型深度解析:前端工程师的必修内功
前端·css
Dream耀5 小时前
WEUI源码(一),WEUI-Uploader
前端·javascript·css
薛定谔的算法5 小时前
从weui-uploader源码看前端开发的「隐形必修课」——大厂面试高频考点解析
前端·css
LBJ辉6 小时前
9. CSS 引入方式
开发语言·前端·css
JCjunior6 小时前
html和css实现文本打断换行、自动换行
前端·css·html