纯CSS3创意loading文字特效
快速使用Romanysoft LAB的技术实现 HTML 开发Mac OS App,并销售到苹果应用商店中。《HTML开发Mac OS App 视频教程》
- 土豆网同步更新:http://www.tudou.com/plcover/VHNh6ZopQ4E/
- 百度网盘同步:http://pan.baidu.com/s/1jG1Q58M
- 分享 [中文纪录片]互联网时代 http://pan.baidu.com/s/1qWkJfcS
官方QQ群:(申请加入,说是我推荐的)
- App实践出真知 434558944
- App学习交流 452180823
简要教程
这是一款非常有创意的纯CSS3 loading加载文字动画特效。该loading文字特效中,字母O的内圆会不停的放大缩小,使用这个动画效果来提示用户当前的页面或任务正在加载中。
使用方法
HTML结构
该loading文字特效的HTML结构中,不动画的文字使用<span>
来制作,动画的文字使用一个三层嵌套的<div>
来制作。
< div id = "cupcake" class = "box" > < span class = "letter" >L</ span > < div class = "cupcakeCircle box" > < div class = "cupcakeInner box" > < div class = "cupcakeCore box" ></ div > </ div ></ div > < span class = "letter box" >A</ span > < span class = "letter box" >D</ span > < span class = "letter box" >I</ span > < span class = "letter box" >N</ span > < span class = "letter box" >G</ span > </ div > |
CSS样式
这个loading特效中的布局使用的是flex布局方式。IE11以下的浏览器都不支持CSS flex属性,所以布局会非常混乱。
#cupcake{ flex-direction :row; -webkit- flex-direction :row; -ms- flex-direction :row; -mos- flex-direction :row; -o- flex-direction :row; justify-content : center ; -webkit- justify-content : center ; -ms- justify-content : center ; height : 100% ; width : 100% ; background-color : #FFD454 ; } .letter{ font-size : 100px ; color : #222 ; font-family : tahoma ; } .box{ display : box; display : -webkit-box; display : -moz-box; display : -ms-flexbox; display : -webkit-flex; display : flex; } .cupcakeCircle, .cupcakeInner, .cupcakeCore{ border-radius : 50% ; -webkit- border-radius : 50% ; -moz- border-radius : 50% ; -ms- border-radius : 50% ; } .cupcake, .letter, .cupcakeCircle, .cupcakeInner, .cupcakeCore{ flex : none ; -webkit- flex : none ; -moz- flex : none ; -ms- flex : none ; -o- flex : none ; } .letter, .cupcakeCircle{ align-self: center ; -webkit-align-self: center ; -moz-align-self: center ; -o-align-self: center ; -ms-align-self: center ; } .cupcakeCircle{ align-items : center ; -ms- align-items : center ; justify-content : center ; -ms- justify-content : center ; height : 100px ; width : 100px ; background-color : #222 ; } |
字母的动画使用的是CSS animation来制作。动画被设置为无线循环,并使用ease-in-out
的easing效果。
.cupcakeInner{ align-self: center ; -ms-align-self: center ; justify-content : center ; -ms- justify-content : center ; height : 50% ; width : 50% ; background-color : #FFD454 ; animation-name :cupcakeAnimate; animation-duration : 500 ms; animation-direction :alternate; animation-timing-function :ease-in-out; animation-iteration-count :infinite; -webkit- animation-name :cupcakeAnimate; -webkit- animation-duration : 500 ms; -webkit- animation-direction :alternate; -webkit- animation-timing-function :ease-in-out; -webkit- animation-iteration-count :infinite; } .cupcakeCore{ align-self: center ; -ms-align-self: center ; height : 25% ; width : 25% ; background-color : #222 ; animation-name :coreAnimate; animation-duration : 1 s; animation-direction :alternate; animation-timing-function :ease-in-out; animation-iteration-count :infinite; -webkit- animation-name :coreAnimate; -webkit- animation-duration : 1 s; -webkit- animation-direction :alternate; -webkit- animation-timing-function :ease-in-out; -webkit- animation-iteration-count :infinite; } @-webkit-keyframes cupcakeAnimate{ to{ height : 90% ; width : 90% ; } } @keyframes cupcakeAnimate{ to{ height : 90% ; width : 90% ; } } @-webkit-keyframes coreAnimate{ to{ height : 90% ; width : 90% ; } } @keyframes coreAnimate{ to{ height : 90% ; width : 90% ; } } |
纯CSS3创意loading文字特效的更多相关文章
- 纯css3实现的文字亮光特效
今天给大家分享一款纯css3实现的文字亮光特效.这款特效文字上一道亮光逐渐扫过文字.效果非常漂亮.一起看下效果: 在线预览 源码下载 实现的代码. html代码: <span class=& ...
- 创意HTML5文字特效 类似翻页的效果
原文:创意HTML5文字特效 类似翻页的效果 之前在网上看到一款比较有新意的HTML5文字特效,文字效果是当鼠标滑过是出现翻开折叠的效果,类似书本翻页.于是我兴致勃勃的点开源码看了一下,发现其实实现也 ...
- 纯CSS3实现图片展示特效
本文中要实现的一个纯CSS3的图片展示特效,以前只能用JavaScript实现,可想而知会受到多方面的限制,特别是性能.而今天我们将用简单的CSS3代码实现,你会发现它的动画效果在现代浏览器的帮助下无 ...
- 纯CSS3实现loading正在加载。。。
场景分析:随着我司专职前端切图人员离职,切图的活重新落到我们小组团队成员的日常任务list里面,加上我们小组 7个前端 基本都是后台转的前端 (赶鸭子上架 前端现在需求量大 没办法) 加上自己也将就一 ...
- CSS3实现Loading动画特效
查看效果:http://hovertree.com/texiao/css3/43/ 代码如下: <!DOCTYPE html> <html> <head> < ...
- 纯CSS3手风琴图片滑动特效
要求 必备知识 基本了解CSS语法,初步了解CSS3语法知识. 开发环境 Adobe Dreamweaver CS6/Chrome浏览器 演示地址 演示地址 制作CSS3制作手风琴图片滑动效果,我们仅 ...
- 纯css3 transforms 3D文字翻开翻转3D开放式效果
详细内容请点击 在线预览立即下载 在本教程中,将基于CSS3创建的一个实现一个有趣的3D开放式效果.教程的目的是展示我们如何能带来一些生活上使用CSS3 . html: <ul class=&q ...
- 38.纯 CSS 创作阶梯文字特效
原文地址:https://segmentfault.com/a/1190000015107942 HTML code: <div class="container"> ...
- 如何用纯 CSS 创作阶梯文字特效
效果预览 在线演示 按下右侧的"点击预览"按钮可以在当前页面预览,点击链接可以全屏预览. https://codepen.io/comehope/pen/MXYBEM 可交互视频教 ...
随机推荐
- cordova 生成发行版apk,并添加证书 – 畅玩Coding
原文:cordova 生成发行版apk,并添加证书 – 畅玩Coding 首先jdk生成证书. 1.进入jdk安装目录 D:\Java\jdk1.7.0\bin 2.执行命令 keytool -gen ...
- spring boot 生成 war 包有一个war.original是什么?
两个坑 .war.original 生成这种格式的文件,是因为在开启了二次打包.具体可以看这里 修改入口文件的配置 , 官方文档看这里 类似下面的代码,要继承SpringBootServletInit ...
- java中unicode utf-8以及汉字之间的转换工具类
1. 汉字字符串与unicode之间的转换 1.1 stringToUnicode /** * 获取字符串的unicode编码 * 汉字"木"的Uni ...
- android开发之微信支付功能的实现
移动开发中,支付类的App越来越多,对于开发者来说也是不可少的,不可不会的:下面就来说一说支付开发的流程 1.申请你的AppID 请到 开发者应用登记页面 进行登记,登记并选择移动应用进行设置后,将该 ...
- Mapreduce 订单分组案例
程序执行流程如下: map()-->getPartition()分区--->write()(序列化,每一行都顺序执行这三个方法)--->readFields()---->com ...
- hadoop编程技巧(8)---Unit Testing (单元测试)
所需的环境: Hadoop相关jar包裹(下载版本的官方网站上可以): 下载junit包裹(新以及). 下载mockito包裹: 下载mrunit包裹: 下载powermock-mockito包裹: ...
- O'Stolz 定理及其应用
1. 基本形式 对于 ⋆∞(分母为无穷大,分子无要求),设两数列 an,bn,满足: bn 严格单调递增: limn→∞bn=∞ 如果有 limn→∞an+1−anbn+1−bn=L(L 为有限实数) ...
- 道量化交易程序猿(25)--Cointrader之MarketData市场数据实体(12)
转载注明出处:http://blog.csdn.net/minimicall.http://cloudtrade.top/ 前面一节我们说到了远端事件.当中.市场数据就属于远端事件.市场数据有什么?我 ...
- 清晰明亮的白色lua协程(coroutine)
协同程序线程类和多线程下似:它有它自己的堆栈.自己的局部变量.它有自己的指令指针,但是,其他协程共享全局变量和其他项目信息.主要不同在于:多处理器的情况下.概念上来说多线程是同一时候执行多个线程,而协 ...
- 关于QWidget和QDialog窗体居中的问题(必须要setFixedSize设初始值大小,否则没法居中)
最近开发中,遇到了窗体不能居中的问题,看了网上的很多文章,窗口居中,无非都是move至窗口的中心目标; 有两种方式, 一种在构造函数中直接计算中心坐标; 另一种是在窗口show后再move至相应坐标. ...