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闪亮进度条效果实现思路及代码
Apr 17 HTML / CSS
css3 position fixed固定居中问题解决方案
Aug 19 HTML / CSS
魔幻般冒泡背景的CSS3按钮动画
Feb 27 HTML / CSS
详解CSS3阴影 box-shadow的使用和技巧总结
Dec 03 HTML / CSS
使用HTML5捕捉音频与视频信息概述及实例
Aug 22 HTML / CSS
HTML5移动开发图片压缩上传功能
Nov 09 HTML / CSS
HTML5 MiranaVideo播放器 (代码开源)
Jun 11 HTML / CSS
HTML5之SVG 2D入门2—图形绘制(基本形状)介绍及使用
Jan 30 HTML / CSS
HTML5使用drawImage()方法绘制图像
Jun 23 HTML / CSS
使用phonegap进行本地存储的实现方法
Mar 31 HTML / CSS
HTML5在手机端实现视频全屏展示方法
Nov 23 HTML / CSS
六个好看实用的 HTML + CSS 后台登录入口页面
Apr 28 HTML / CSS
CSS3 天气图标动画效果
CSS3 制作精美的定价表
CSS 圆形进度栏
CSS 文字装饰 text-decoration & text-emphasis 详解
奇妙的 CSS shapes(CSS图形)
html+css合并表格边框的示例代码
使用HTML+Css+transform实现3D导航栏的示例代码
You might like
提高php运行速度的一些小技巧分享
2012/07/03 PHP
php的api数据接口书写实例(推荐)
2016/09/22 PHP
PHP单例模式详解及实例代码
2016/12/21 PHP
jQuery 方法大全方便学习参考
2010/02/25 Javascript
js原生态函数中使用jQuery中的 $(this)无效的解决方法
2011/05/25 Javascript
javascript实现日历控件(年月日关闭按钮)
2012/12/12 Javascript
extjs关于treePanel+chekBox全部选中以及清空选中问题探讨
2013/04/02 Javascript
js事件冒泡实例分享(已测试)
2013/04/23 Javascript
一款由jquery实现的整屏切换特效
2014/09/15 Javascript
jquery实现很酷的网页顶部图标下拉菜单效果
2015/08/22 Javascript
基于JavaScript实现屏幕滚动效果
2017/01/18 Javascript
jQuery中用on绑定事件时需注意的事项
2017/03/19 Javascript
jQuery实现获取动态添加的标签对象示例
2018/06/28 jQuery
Nodejs监听日志文件的变化的过程解析
2019/08/04 NodeJs
解决vue中使用proxy配置不同端口和ip接口问题
2019/08/14 Javascript
Vue 自定义指令实现一键 Copy功能
2019/09/16 Javascript
详解用js代码触发dom事件的实现方案
2020/06/10 Javascript
Python获取Windows或Linux主机名称通用函数分享
2014/11/22 Python
python在控制台输出进度条的方法
2015/06/20 Python
PyQt4实现下拉菜单可供选择并打印出来
2018/04/20 Python
浅谈python之高阶函数和匿名函数
2019/03/21 Python
python GUI库图形界面开发之PyQt5输入对话框QInputDialog详细使用方法与实例
2020/02/27 Python
Python3 pywin32模块安装的详细步骤
2020/05/26 Python
python进度条显示之tqmd模块
2020/08/22 Python
韩国三星集团旗下时尚品牌官网:SSF SHOP
2016/08/02 全球购物
捷克电器和DJ设备网上商店:Electronic-star
2017/07/18 全球购物
德国玩具商店:Planet Happy DE
2021/01/16 全球购物
在weblogic中发布ejb需涉及到哪些配置文件
2012/01/17 面试题
会计自荐书
2013/12/02 职场文书
护理专业毕业生自荐信范文
2014/01/05 职场文书
中层竞聘演讲稿
2014/01/09 职场文书
迟到检讨书800字
2014/01/13 职场文书
学生干部培训方案
2014/06/12 职场文书
党的群众路线对照检查材料(个人)
2014/09/24 职场文书
护士长2015年终工作总结
2015/04/24 职场文书
高三化学教学反思
2016/02/22 职场文书