CSS 实现页面底部加载中与加载完毕效果

效果图

实现代码

html 复制代码
<view class="bottom-load-tip">
  <view class="line-tip"></view>
  <view class="loading-animation" v-if="!lastPage"></view>
  <view>{{ lastPage ? "没有更多了" : "加载中" }}</view>
  <view class="line-tip"></view>
</view>
css 复制代码
/* 底部加载中 */
.bottom-load-tip {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #999;
  font-size: 24rpx;
  margin-top: 20rpx;
  .line-tip {
    width: 10%;
    height: 1rpx;
    background: #c0c4cc;
    margin: 0 15rpx;
  }
  .loading-animation {
    position: relative;
    margin-right: 30rpx;
    margin-left: 8rpx;
  }
  .loading-animation::before {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    width: 6rpx;
    height: 6rpx;
    color: rgba(0, 0, 0, 0.4);
    margin: auto;
    box-shadow: 0 -14rpx rgba(0, 0, 0, 0.9), 14rpx 0, 0 14rpx, -14rpx 0 rgba(0, 0, 0, 0.7), -10rpx -10rpx rgba(0, 0, 0, 0.8),
      10rpx -10rpx rgba(0, 0, 0, 1), 10rpx 10rpx, -10rpx 10rpx;
    animation: loading-spin 1s steps(8) infinite;
    border-radius: 100%;
  }
}
@keyframes loading-spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}
相关推荐
布列瑟农的星空22 分钟前
rsbuild mock 插件开发指南
前端
用泥种荷花37 分钟前
【LangChain.js学习】 文档加载(Loader)与文本分割全解析
前端
cxxcode1 小时前
Vite 热更新(HMR)原理详解
前端
HelloReader1 小时前
Tauri 架构从“WebView + Rust”到完整工具链与生态
前端
Bigger2 小时前
告别版本焦虑:如何为 Hugo 项目定制专属构建环境
前端·架构·go
代码匠心3 小时前
AI 自动编程:一句话设计高颜值博客
前端·ai·ai编程·claude
_AaronWong5 小时前
Electron 实现仿豆包划词取词功能:从 AI 生成到落地踩坑记
前端·javascript·vue.js
cxxcode5 小时前
I/O 多路复用:从浏览器到 Linux 内核
前端
用户5433081441945 小时前
AI 时代,前端逆向的门槛已经低到离谱 — 以 Upwork 为例
前端
JarvanMo5 小时前
Flutter 版本的 material_ui 已经上架 pub.dev 啦!快来抢先体验吧。
前端