css3实现的加载动画效果


Posted in HTML / CSS onApril 07, 2021

实现效果

css3实现的加载动画效果

实现代码

html

<div class='peeek-loading'>
  <ul>
    <li></li>
    <li></li>
    <li></li>
    <li></li>
    <li></li>
    <li></li>
    <li></li>
    <li></li>
    <li></li>
    <li></li>
  </ul>
</div>

css3

.peeek-loading {
  background-color: #38d368;
  overflow: hidden;
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
  height: 100%;
  width: 100%;
}

.peeek-loading ul {
  position: absolute;
  left: calc(50% - 0.7em);
  top: calc(50% - 4.2em);
  display: inline-block;
  text-indent: 2.8em;
}

.peeek-loading ul li:after,
.peeek-loading ul:after {
  width: 1.4em;
  height: 1.4em;
  background-color: #fff;
  border-radius: 100%;
}

.peeek-loading ul li:after,
.peeek-loading ul:after {
  content: "";
  display: block;
}

.peeek-loading ul:after {
  position: absolute;
  top: 2.8em;
}

.peeek-loading li {
  position: absolute;
  padding-bottom: 5.6em;
  top: 0;
  left: 0;
}

.peeek-loading li:nth-child(1) {
  transform: rotate(0deg);
  animation-delay: 0.125s;
}

.peeek-loading li:nth-child(1):after {
  animation-delay: 0.125s;
}

.peeek-loading li:nth-child(2) {
  transform: rotate(36deg);
  animation-delay: 0.25s;
}

.peeek-loading li:nth-child(2):after {
  animation-delay: 0.25s;
}

.peeek-loading li:nth-child(3) {
  transform: rotate(72deg);
  animation-delay: 0.375s;
}

.peeek-loading li:nth-child(3):after {
  animation-delay: 0.375s;
}

.peeek-loading li:nth-child(4) {
  transform: rotate(108deg);
  animation-delay: 0.5s;
}

.peeek-loading li:nth-child(4):after {
  animation-delay: 0.5s;
}

.peeek-loading li:nth-child(5) {
  transform: rotate(144deg);
  animation-delay: 0.625s;
}

.peeek-loading li:nth-child(5):after {
  animation-delay: 0.625s;
}

.peeek-loading li:nth-child(6) {
  transform: rotate(180deg);
  animation-delay: 0.75s;
}

.peeek-loading li:nth-child(6):after {
  animation-delay: 0.75s;
}

.peeek-loading li:nth-child(7) {
  transform: rotate(216deg);
  animation-delay: 0.875s;
}

.peeek-loading li:nth-child(7):after {
  animation-delay: 0.875s;
}

.peeek-loading li:nth-child(8) {
  transform: rotate(252deg);
  animation-delay: 1s;
}

.peeek-loading li:nth-child(8):after {
  animation-delay: 1s;
}

.peeek-loading li:nth-child(9) {
  transform: rotate(288deg);
  animation-delay: 1.125s;
}

.peeek-loading li:nth-child(9):after {
  animation-delay: 1.125s;
}

.peeek-loading li:nth-child(10) {
  transform: rotate(324deg);
  animation-delay: 1.25s;
}

.peeek-loading li:nth-child(10):after {
  animation-delay: 1.25s;
}

.peeek-loading li {
  animation: dotAnimation 2.5s infinite;
}

@keyframes dotAnimation {
  0%, 55%, 100% {
    padding: 0 0 5.6em 0;
  }
  5%, 50% {
    padding: 2.8em 0;
  }
}
.peeek-loading li:after {
  animation: dotAnimationTwo 2.5s infinite;
}

@-webkit-keyframes dotAnimationTwo {
  0%, 55%, 100% {
    opacity: 1;
    transform: scale(1);
  }
  5%, 50% {
    opacity: 0.5;
    transform: scale(0.5);
  }
}

以上就是css3实现的加载动画效果的详细内容,更多关于css3 加载动画的资料请关注三水点靠木其它相关文章!

 
HTML / CSS 相关文章推荐
纯CSS3实现图片无间断轮播效果
Aug 25 HTML / CSS
纯HTML+CSS3制作导航菜单(附源码)
Apr 24 HTML / CSS
CSS3,线性渐变(linear-gradient)的使用总结
Jan 09 HTML / CSS
基于CSS3的animation属性实现微信拍一拍动画效果
Jun 22 HTML / CSS
CSS3动画和HTML5新特性详解
Aug 31 HTML / CSS
HTML5 实战PHP之Web页面表单设计
Oct 09 HTML / CSS
使用HTML5的表单验证的简单示例
Sep 09 HTML / CSS
HTML5中外部浏览器唤起微信分享
Jan 02 HTML / CSS
iframe与window.onload如何使用详解
May 07 HTML / CSS
html5简介及新增功能介绍
May 18 HTML / CSS
HTML5 语义化标签(移动端必备)
Aug 23 HTML / CSS
html中相对位置与绝对位置的具体使用
May 15 HTML / CSS
CSS3 天气图标动画效果
CSS3 制作精美的定价表
CSS 圆形进度栏
CSS 文字装饰 text-decoration & text-emphasis 详解
奇妙的 CSS shapes(CSS图形)
html+css合并表格边框的示例代码
使用HTML+Css+transform实现3D导航栏的示例代码
You might like
PHP中几种常见的超时处理全面总结
2012/09/11 PHP
php中Ioc(控制反转)和Di(依赖注入)
2017/05/07 PHP
总结PHP内存释放以及垃圾回收
2018/03/29 PHP
php session_decode函数用法讲解
2019/05/26 PHP
二级域名转向类
2006/11/09 Javascript
Jquery加载时从后台读取数据绑定到dropdownList实例
2013/06/09 Javascript
javascript break指定标签打破多层循环示例
2014/01/20 Javascript
Javascript实现div的toggle效果实例分析
2015/06/09 Javascript
javascript设计模式--策略模式之输入验证
2015/11/27 Javascript
微信小程序 UI布局常用技巧整理总结
2016/12/05 Javascript
详解Vue-基本标签和自定义控件
2017/03/24 Javascript
WebSocket的简单介绍及应用
2019/05/23 Javascript
react native 仿微信聊天室实例代码
2019/09/17 Javascript
react-intl实现React国际化多语言的方法
2020/09/27 Javascript
python文件读写操作与linux shell变量命令交互执行的方法
2015/01/14 Python
Python计算字符宽度的方法
2016/06/14 Python
django模板语法学习之include示例详解
2017/12/17 Python
Python实现识别手写数字大纲
2018/01/29 Python
Python Subprocess模块原理及实例
2019/08/26 Python
python 用户交互输入input的4种用法详解
2019/09/24 Python
基于torch.where和布尔索引的速度比较
2020/01/02 Python
python实现音乐播放器 python实现花框音乐盒子
2020/02/25 Python
Python自带的IDE在哪里
2020/07/01 Python
Python生成器传参数及返回值原理解析
2020/07/22 Python
用Python实现童年贪吃蛇小游戏功能的实例代码
2020/12/07 Python
荷兰领先的百货商店:De Bijenkorf
2018/10/17 全球购物
高校教师思想汇报
2014/01/11 职场文书
大学生咖啡店创业计划书
2014/01/21 职场文书
课例研修方案
2014/05/31 职场文书
乡镇个人对照检查材料
2014/08/22 职场文书
大学生村官个人对照检查材料(群众路线)
2014/09/26 职场文书
教师师德师风自我剖析材料
2014/09/29 职场文书
2014年干部培训工作总结
2014/12/17 职场文书
2015年干部教育培训工作总结
2015/05/15 职场文书
2015年度学校应急管理工作总结
2015/10/22 职场文书
导游词之阳朔遇龙河
2019/12/16 职场文书