css加载中动画

html 复制代码
<!doctype html>
<html lang="en">
 <head>
  <meta charset="UTF-8">
<style>
#loader .square:nth-child(5n+1) {
    background: #0F9;
    animation-delay: 0s;
}
#loader .square:nth-child(5n+2) {
    background: #0CF;
    animation-delay: 0.1s;
}
#loader .square:nth-child(5n+3) {
    background: #93F;
    animation-delay: 0.2s;
}
#loader .square:nth-child(5n+4) {
    background: #F66;
    animation-delay: 0.3s;
}
#loader .square:nth-child(5n+5) {
    background: #FFF35C;
    animation-delay: 0.4s;
}

#loader {
    width: 500px;
    position: absolute;
    text-align: center;
    left: calc(50% - 250px);
    top: calc(50% - 10px);
}

#loader .square {
    display: inline-block;
    height: 10px;
    width: 10px;
    margin: 10px;
    position: relative;
    box-shadow: 0 0 20px rgba(0, 0, 0, .3);
    animation: wave 1s cubic-bezier(.455,.03,.515,.955) infinite;
}

@keyframes wave {
    0% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-20px);
    }
    100% {
        transform: translateY(0);
    }
}
</style>
 </head>
 <body>

  <div id="loader">
        <div class="square"></div>
        <div class="square"></div>
        <div class="square"></div>
        <div class="square"></div>
        <div class="square"></div>
		<div>加载中。。。</div>
    </div>
 </body>
</html>
相关推荐
鹏多多7 分钟前
vue计算属性computed的详解
前端·javascript·vue.js
JarvanMo8 分钟前
Flutter 应用安全清单
前端
浩男孩10 分钟前
🍀实际开发中没想到 computed 在表单中还能这么使用🚀🚀
前端·vue.js
月下点灯13 分钟前
uniapp仿抖音评论区popup对话框实现(多端兼容)
前端·javascript·vue.js
江城开朗的豌豆23 分钟前
React的渲染时机:聊透虚拟DOM的更新机制
前端·javascript·react.js
anyup30 分钟前
🔥🔥 uView Pro:Vue3+TS重构的uni-app开源组件库,文档免费无广告!
前端·vue.js·uni-app
CodeSheep40 分钟前
我天,Java 已沦为老四。。
前端·后端·程序员
掘金安东尼1 小时前
使用 Web Components 与 CSS Modules 构建原生应用架构
javascript·后端·面试
前端小巷子1 小时前
Vue 逻辑抽离全景解析
前端·vue.js·面试
excel1 小时前
前端事件机制入门到精通:事件流、冒泡捕获与事件委托全解析
前端