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 相关文章推荐
网页布局中CSS样式无效的十个重要原因详解
Aug 10 HTML / CSS
一款超酷的js+css3实现的3D标签云特效兼容ie7/8/9
Nov 18 HTML / CSS
纯CSS3打造动感漂亮时尚的扇形菜单
Mar 18 HTML / CSS
关于css兼容性问题及一些常见问题汇总
May 03 HTML / CSS
HTML5之SVG 2D入门3—文本与图像及渲染文本介绍
Jan 30 HTML / CSS
HTML5 创建canvas元素示例代码
Jun 04 HTML / CSS
一款html5 canvas实现的图片玻璃碎片特效
Sep 11 HTML / CSS
基于HTML5代码实现折叠菜单附源码下载
Nov 27 HTML / CSS
很酷的HTML5电子书翻页动画特效
Feb 25 HTML / CSS
使用phonegap进行提示操作的具体方法
Mar 30 HTML / CSS
canvas探照灯效果的示例代码
Nov 30 HTML / CSS
老生常谈 使用 CSS 实现三角形的技巧(多种方法)
Apr 13 HTML / CSS
CSS3 天气图标动画效果
CSS3 制作精美的定价表
CSS 圆形进度栏
CSS 文字装饰 text-decoration & text-emphasis 详解
奇妙的 CSS shapes(CSS图形)
html+css合并表格边框的示例代码
使用HTML+Css+transform实现3D导航栏的示例代码
You might like
PHP 加密/解密函数 dencrypt(动态密文,带压缩功能,支持中文)
2009/01/30 PHP
smarty模板局部缓存方法使用示例
2014/06/17 PHP
PHP通过串口实现发送短信
2015/07/08 PHP
微信支付开发发货通知实例
2016/07/12 PHP
PHP实现的字符串匹配算法示例【sunday算法】
2017/12/19 PHP
关于PhpStorm设置点击编辑文件自动定位源文件的实现方式
2020/12/30 PHP
XP折叠菜单&amp;仿QQ2006菜单
2006/12/16 Javascript
htm调用JS代码
2007/03/15 Javascript
解决AJAX中跨域访问出现'没有权限'的错误
2008/08/20 Javascript
jQuery实现的立体文字渐变效果
2010/05/17 Javascript
javascript实现上传图片并预览的效果实现代码
2011/04/11 Javascript
JS事件Event元素(兼容IE,Firefox,Chorme)
2012/11/01 Javascript
控制input输入框中提示信息的显示和隐藏的方法
2014/02/12 Javascript
jquery-syntax动态语法着色示例代码
2014/05/14 Javascript
深入理解JavaScript系列(34):设计模式之命令模式详解
2015/03/03 Javascript
实现前后端数据交互方法汇总
2015/04/07 Javascript
使用RequireJS优化JavaScript引用代码的方法
2015/07/01 Javascript
TypeScript学习之强制类型的转换
2016/12/27 Javascript
JS正则表达式验证中文字符
2017/05/08 Javascript
js实现方块上下左右移动效果
2017/08/17 Javascript
layer弹出子iframe层父子页面传值的实现方法
2018/11/22 Javascript
微信小程序学习笔记之表单提交与PHP后台数据交互处理图文详解
2019/03/28 Javascript
在vue中使用vant TreeSelect分类选择组件操作
2020/11/02 Javascript
python项目对接钉钉SDK的实现
2019/07/15 Python
Python 用turtle实现用正方形画圆的例子
2019/11/21 Python
美国大城市最热门旅游景点门票:CityPASS
2016/12/16 全球购物
会计专业应届生求职信
2013/11/24 职场文书
毕业自荐信
2013/12/16 职场文书
收银出纳员岗位职责
2014/02/23 职场文书
小学毕业典礼主持词
2014/03/27 职场文书
工作失误检讨书(3篇)
2014/10/11 职场文书
2014年加油站站长工作总结
2014/12/23 职场文书
2016年劳模先进事迹材料
2016/02/25 职场文书
python文本处理的方案(结巴分词并去除符号)
2021/05/26 Python
聊一聊Redis与MySQL双写一致性如何保证
2021/06/26 Redis
CSS实现九宫格布局(自适应)的示例代码
2022/02/12 HTML / CSS