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区域模块region相关编写示例
Aug 28 HTML / CSS
使用CSS3的::selection改变选中文本颜色的方法
Sep 29 HTML / CSS
CSS3条纹背景制作的实战攻略
May 31 HTML / CSS
CSS3实现自定义Checkbox特效实例代码
Apr 24 HTML / CSS
使用 css3 实现圆形进度条的示例
Jul 05 HTML / CSS
Html5上传图片 移动端、PC端通用代码
Jun 08 HTML / CSS
HTML5 Canvas draw方法制作动画效果示例
Jul 11 HTML / CSS
阻止移动设备(手机、pad)浏览器双击放大网页的方法
Jun 03 HTML / CSS
canvas 实现 github404动态效果的示例代码
Nov 15 HTML / CSS
如何使用canvas绘制可移动网格的示例代码
Dec 14 HTML / CSS
CSS3 Tab动画实例之背景切换动态效果
Aug 23 HTML / CSS
CSS布局之浮动(float)和定位(position)属性的区别
Sep 25 HTML / CSS
CSS3 天气图标动画效果
CSS3 制作精美的定价表
CSS 圆形进度栏
CSS 文字装饰 text-decoration & text-emphasis 详解
奇妙的 CSS shapes(CSS图形)
html+css合并表格边框的示例代码
使用HTML+Css+transform实现3D导航栏的示例代码
You might like
虫族 Zerg 魔法科技
2020/03/14 星际争霸
索尼ICF-SW100收音机评测
2021/03/02 无线电
PHP 命令行参数详解及应用
2011/05/18 PHP
基于PHP字符串的比较函数strcmp()与strcasecmp()的使用详解
2013/05/15 PHP
PHP多例模式介绍
2013/06/24 PHP
php实现XSS安全过滤的方法
2015/07/29 PHP
JQuery 风格的HTML文本转义
2009/07/01 Javascript
基于javascript实现简单的抽奖系统
2020/04/15 Javascript
js中获取jsp表单中radio类型的值简单实例
2016/08/15 Javascript
JavaScript常见的五种数组去重的方式
2016/12/15 Javascript
Bootstrap模态框案例解析
2017/03/05 Javascript
JS简单实现自定义右键菜单实例
2017/05/31 Javascript
JS设计模式之观察者模式实现实时改变页面中金额数的方法
2018/02/05 Javascript
react配合antd组件实现的管理系统示例代码
2018/04/24 Javascript
vue 查看dist文件里的结构(多种方式)
2020/01/17 Javascript
vue3.0搭配.net core实现文件上传组件
2020/10/29 Javascript
[01:12:40]DOTA2-DPC中国联赛 正赛 DLG vs XG BO3 第三场 1月25日
2021/03/11 DOTA
python执行外部程序的常用方法小结
2015/03/21 Python
django模板语法学习之include示例详解
2017/12/17 Python
浅谈Pandas中map, applymap and apply的区别
2018/04/10 Python
Python3.6日志Logging模块简单用法示例
2018/06/14 Python
opencv python 傅里叶变换的使用
2018/07/21 Python
python 实现图片旋转 上下左右 180度旋转的示例
2019/01/24 Python
python使用BeautifulSoup与正则表达式爬取时光网不同地区top100电影并对比
2019/04/15 Python
Python超越函数积分运算以及绘图实现代码
2019/11/20 Python
利用python绘制中国地图(含省界、河流等)
2020/09/21 Python
css3闪亮进度条效果实现思路及代码
2013/04/17 HTML / CSS
AmazeUI中模态框的实现
2020/08/19 HTML / CSS
策划创业计划书
2014/02/06 职场文书
市场营销专业求职信
2014/06/17 职场文书
环境科学专业教师求职信
2014/07/12 职场文书
公司收款委托书范本
2014/09/20 职场文书
聚众斗殴罪辩护词
2015/05/21 职场文书
三好学生主要事迹怎么写
2015/11/03 职场文书
如何在CocosCreator里画个炫酷的雷达图
2021/04/16 Javascript
在python中读取和写入CSV文件详情
2022/06/28 Python