css3,环绕圆环 loading,小组件
一个loading的小组件, 给其他模块调用。先上图
type:cat
type:ball
第一幅loading,老鼠是一个圆形的背景图片,已经转成base64。 小猫也是图片 也已经转成base64.
老鼠的父div,一直在rotate。
小猫的眼珠,是不动的。动的是 小猫的眼球div,眼球div一直在rotate,眼珠是绝对定位在眼球的底部,这样眼球转起来的时候,给人的感觉就是眼珠再转。
第二幅loading的小球也是上面这个原理。
文字的动画,是用宽度,和透明度的变化来实现的。
源代码 css 代码是用less 编写的。并且这个type,涉及到模块化的一点东西。所以下面就贴出,2个loading的 dom和css。
第一幅的css
.loadingcat-wrap {
position: absolute;
left: 0px;
right: 0px;
top: 0px;
bottom: 0px;
z-index:;
background-color: rgba(0, 0, 0, 0.6);
box-shadow: 1px 1px 50px rgba(0, 0, 0, 0.3);
display: flex;
justify-content: center;
align-items: center;
flex-direction: column;
overflow: hidden;
}
.loadingcat-wrap .loadingcat {
width: 150px;
height: 150px;
border-radius: 150px;
background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAJYAAACWCAYAAAA8AXHiAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyhpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNi1jMDY3IDc5LjE1Nzc0NywgMjAxNS8wMy8zMC0yMzo0MDo0MiAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xL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JvtrbcDqtSt5mJnrHq9nHJaF4fjVV5hlophqDrQOtplo67H8D/f9WqMixDjkDtRiuN1lVziURjkYrA3b8IjUVoLEJjEUJjERqL0FiE0FiExiI0FiE0FqGxCI1FCI1FaCxCYxEShv8JMABJX3wc/SiOXQAAAABJRU5ErkJggg==);
position: relative;
display: flex;
justify-content: center;
align-items: center;
animation: catspin 3s linear infinite;
animation-play-state: running;
}
@keyframes catspin {
0% {
transform: rotate(1turn);
}
100% {
transform: rotate(0turn);
}
}
.loadingcat-wrap .cat {
background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADgAAAA2CAYAAACSjFpuAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyhpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNi1jMDY3IDc5LjE1Nzc0NywgMjAxNS8wMy8zMC0yMzo0MDo0MiAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENDIDIwMTUgKE1hY2ludG9zaCkiIHhtcE1NOklu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YqimxBWpNmE9jjMat7h0Ne1vs86eJWF9UiOpngXtKjlytGZ91mAQN5+plh2EjFMXOPWnu6uG36qnFCQea/gPk+5zct0+2s2zelzlRQDE58bc6yqN/DfHettvxc5yIvWPQ5kiTQT8F8MVWeptT45KZmzsSW5bmeNDpfIf2O9FzdAMShiTxnkWjxa5Z/yrvfjXr+Jm8DP0t6w4rkc04n+q8AAwCkvGteDg25CAAAAABJRU5ErkJggg==);
width: 56px;
height: 54px;
position: relative;
top: -100px;
}
.loadingcat-wrap .cat .eye {
width: 20px;
height: 20px;
border-radius: 20px;
position: absolute;
animation: scatpin 2s linear infinite;
animation-play-state: running;
}
@keyframes scatpin {
0% {
transform: rotate(1turn);
}
100% {
transform: rotate(0turn);
}
}
.loadingcat-wrap .cat .lefteye {
left: 5px;
top: 15px;
}
.loadingcat-wrap .cat .righteye {
left: 30px;
top: 15px;
}
.loadingcat-wrap .cat .ball {
width: 10px;
height: 10px;
position: absolute;
top: 9px;
left: 5px;
border-radius: 5px;
background-color: #818492;
}
.loadingcat-wrap .text {
color: #fff;
width: 120px;
}
.loadingcat-wrap .text p {
white-space: nowrap;
overflow: hidden;
width: 0px;
animation: textspin 3s ease-in-out infinite;
opacity: 0.7;
filter: alpha(opacity=70);
}
@keyframes textspin {
0% {
width: 0px;
opacity: 0.7;
filter: alpha(opacity=70);
}
50% {
width: 120px;
opacity: 0.7;
filter: alpha(opacity=70);
}
90% {
opacity:;
filter: alpha(opacity=0);
width: 120px;
}
100% {
opacity:;
filter: alpha(opacity=0);
width: 120px;
}
}
第一幅的dom
<div class="loadingcat-wrap"><!--
@require "app/component/loading/loadingcat.less"
-->
<div class="loadingcat">
</div>
<div class="cat">
<div class="eye lefteye">
<div class="ball"></div>
</div>
<div class="eye righteye">
<div class="ball"></div>
</div>
</div>
<div class="text">
<p>L O A D I N G . . .</p>
</div>
</div>
第二幅的css
.loading-wrap {
position: absolute;
left: 0px;
right: 0px;
top: 0px;
bottom: 0px;
z-index:;
background-color: rgba(0, 0, 0, 0.3);
box-shadow: 1px 1px 50px rgba(0, 0, 0, 0.3);
display: flex;
justify-content: center;
align-items: center;
flex-direction: column;
overflow: hidden;
}
.loading-wrap .loading {
width: 100px;
height: 100px;
border-radius: 100px;
background-color: transparent;
border: 1px solid #fff;
position: relative;
animation: spin 1s ease infinite;
animation-play-state: running;
}
.loading-wrap .loading .ball {
width: 20px;
height: 20px;
position: absolute;
border-radius: 10px;
}
.loading-wrap .loading .ball1 {
bottom: 0px;
left: 50%;
margin-left: -10px;
background-color: #FF6552;
}
@keyframes spin {
0% {
transform: rotate(0turn);
}
50% {
transform: rotate(0.5turn);
animation-timing-function: ease-in;
}
100% {
transform: rotate(1turn);
}
}
.loading-wrap .text {
margin-top: 60px;
color: #fff;
width: 120px;
}
.loading-wrap .text p {
white-space: nowrap;
overflow: hidden;
font-size: 13px;
width: 0px;
animation: textspin 3s ease-in-out infinite;
opacity: 0.7;
filter: alpha(opacity=70);
}
@keyframes textspin {
0% {
width: 0px;
opacity: 0.7;
filter: alpha(opacity=70);
}
50% {
width: 120px;
opacity: 0.7;
filter: alpha(opacity=70);
}
90% {
opacity:;
filter: alpha(opacity=0);
width: 120px;
}
100% {
opacity:;
filter: alpha(opacity=0);
width: 120px;
}
}
第二幅的dom
<div class="loading-wrap"><!--
@require "app/component/loading/loading.less"
-->
<div class="loading">
<div class="ball ball1"></div>
</div>
<div class="text">
<p>L O A D I N G . . .</p>
</div>
</div>
以上。
css3,环绕圆环 loading,小组件的更多相关文章
- 小tip: 使用SVG寥寥数行实现圆环loading进度效果
二.正文 设计师设计了一个图片上传圆环loading进度效果.如下截图: 首先,CSS3是可以实现的,以前写过一篇转大饼的文章:“CSS3实现鸡蛋饼饼状图loading等待转转转”.原理跟这个一模一样 ...
- 小tip: 使用SVG寥寥数行实现圆环loading进度效果(转载)
设计师设计了一个图片上传圆环loading进度效果.如下截图: 首先,CSS3是可以实现的,以前写过一篇转大饼的文章:“CSS3实现鸡蛋饼饼状图loading等待转转转”.原理跟这个一模一样,两个半区 ...
- HTML5 五彩圆环Loading加载动画实现教程
原文:HTML5 五彩圆环Loading加载动画实现教程 今天我们要来介绍一款效果很特别的HTML5 Loading加载动画,不像其他的Loading动画,这款Loading动画颜色很丰富,并且在转圈 ...
- css3 制作圆环进度条
引子 移动端做一个 loadiing 加载的图标,跟以往沿用的都不太一样,是一个圆环进度条,圆环进度条也就罢了,还得能用百分比控制. CSS3 实现圆环 demo 刚开始写这个圆环的时候是参照帖子上给 ...
- iOS阶段学习第34天笔记(UI小组件 UISegment-UISlider-UIStepper-UIProgressView-UITextView介绍)
iOS学习(UI)知识点整理 一.UI小组件 1.UISegmentedControl 分段选择器 实例代码 - (void)viewDidLoad { [super viewDidLoad]; / ...
- 纯css3 加载loading动画特效
最近项目中要实现当页面还没有加载完给用户提示正在加载的loading,本来是想做个图片提示的,但是图片如果放大电脑的分辨率就会感觉到很虚,体验效果很不好.于是就采用css3+js实现这个loading ...
- cocos2d-html5如何更改预加载时的默认的logo图片和删除loading小圈圈
找到框架目录(2.1.4)里的cocos2d目录里有个CCLoader.js文件,找到LoaderScene的构造方法ctor,可以看到有一行: this._logoTexture.src= &quo ...
- Widget小组件
一.使用步骤: 1.建立Widget的样式布局文件widght,布局只支持几种,比如,相对布局,线性布局,帧布局,布局里支持的控件也是有限的. 2.在res下建立一个新的文件夹我的命名为xml 3.在 ...
- .Net用户使用期限的设置、限制通用小组件
.Net用户使用期限的设置.限制通用小组件 最近比较项目组的同事都比较烦,不断的穿梭在不同的项目之间,一个人同时要兼顾多个项目的维护修改.甚至刚放下这个客户的电话,另一个客户的电话就进来了.究其原因, ...
随机推荐
- JavaEE基础(五)
1.Java语言基础(数组概述和定义格式说明) A:为什么要有数组(容器) 为了存储同种数据类型的多个值 B:数组概念 数组是存储同一种数据类型多个元素的集合.也可以看成是一个容器. 数组既可以存储基 ...
- python中时间的基本使用
格式化日期 我们可以使用 time 模块的 strftime 方法来格式化日期,: time.strftime(format[, t]) #!/usr/bin/python # -*- coding: ...
- 【转】使用JDK自带jvisualvm监控tomcat
转载地址: http://my.oschina.net/kone/blog/157239 jdk自带有个jvisualvm工具.该工具是用来监控java运行程序的cpu.内存.线程等的使用情况.并且使 ...
- WebDriver使用指南(完整篇)
第1章 入门 1.1 下载selenium2.0的lib包 http://code.google.com/p/selenium/downloads/list 官方UserGuide: ...
- ASp.net 注册
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default2.aspx.cs ...
- c#委托之最大
public delegate int ceshi(object o1, object o2); static void Main(string[] args) { string[] a = { &q ...
- Resilio(BtSync)搭建
Resilio(原名:BtSync)介绍 同步是使用PC和Mac,NAS,甚至服务器之间传输文件的最好方法.创建自己的私有云.连接设备和同步文件安全,不发送他们在第三方服务器.我们不限制你的速度和存储 ...
- nginx配置SSL证书(使用startSSL申请到的免费证书)
1. 在startSSL注册申请免费证书,此处不赘述,参考 http://www.freehao123.com/startssl-ssl/ 申请过程中会生成Private Key,将Private K ...
- linux 文件操作命令
目录操作命令 命令格式 命令 [-选项] [-参数] ls -la /etc 有多个选项时可以合并 ls命令: -a (all) 显示所有文件,包括隐藏文件,那是用.开头的文件 为什么要隐藏(这是个系 ...
- PHP计划任务之关闭浏览器后仍然继续执行的函数
函数名称:ignore_user_abort 本函数配置或取得使用端连接中断后,PHP 程序是否仍继续执行.默认值为中断连接后就停止执行.在 PHP 配置文件中 (php3.ini/php.ini) ...