加载动画

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>
相关推荐
志尊宝15 小时前
Vue3 零基础每日笔记(026):emit 子传父——defineEmits 与事件校验
前端·javascript·html·vue3
IMPYLH17 小时前
HTML 的 <section> 元素
前端·html
梦帮科技17 小时前
Next.js 16 模块化单体实战:App Router、领域模块与 Route Handler 分层
css·数据结构·链表·正则表达式·node.js·json·html5
csuzhucong17 小时前
混元一号、二号、三号
html
用户2986985301417 小时前
Python 将 HTML 转换为 Word 文档的实践指南
python·html·api
我的div丢了肿么办17 小时前
顶部区域固定,左侧区域滚动,右侧区域滚动,彼此独立
前端·css
IMPYLH18 小时前
HTML 的 <select> 元素
前端·html
前端·柱子18 小时前
Chaikin‘s Corner Cutting 算法 应用canvas绘制平滑的曲线
前端·html
抓不住时间的沙1 天前
Butterfly主题 5.7 导航栏添加相册同时设置相册入口密码
css·python·node.js
我家猫叫佩奇1 天前
🦭 厌倦了千篇一律的线性图标?Naive Icons 正式开源
前端·javascript·css