加载动画

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>
相关推荐
_Kayo_1 小时前
CSS BFC
前端·css
Dorcas_FE7 小时前
【tips】css模仿矢量图透明背景
前端·css
默默地离开9 小时前
Tailwind CSS 4,把样式这事儿交给“类名”就好
前端·css
小楓120110 小时前
後端開發技術教學(三) 表單提交、數據處理
前端·后端·html·php
轻语呢喃11 小时前
Tailwind CSS:原子类名驱动的现代CSS框架
css·html
每天吃饭的羊11 小时前
面试题:Sass
前端·css·sass
水冗水孚13 小时前
从一个动画需求,来学习js中animation动画事件的具体应用
javascript·css·dom
G等你下课13 小时前
如何实现文字行数限制
前端·css
杨超越luckly13 小时前
HTML应用指南:利用GET请求获取全国OPPO官方授权体验店门店位置信息
前端·信息可视化·数据分析·html·argis·门店
归于尽13 小时前
轻松实现图片拖拽交互:让网页元素像 iPad 一样流畅移动
前端·html