一款利用纯css3实现的win8加载动画的实例分析


Posted in HTML / CSS onDecember 11, 2014

今天给大家分享一款纯css3实现的win8加载动画。在这款实例中动画效果完全由css3实现。一起看下效果图:

一款利用纯css3实现的win8加载动画的实例分析

实现的代码。

html代码:

XML/HTML Code复制内容到剪贴板
  1. <div class="wrapp">  
  2.         <div class="text">  
  3.             <h1>  
  4.                 Windows 8</h1>  
  5.         </div>  
  6.         <div class="logo">  
  7.             <span class="top-left"></span><span class="bottom-right"></span>  
  8.         </div>  
  9.     </div>  

css3代码:

CSS Code复制内容到剪贴板
  1. body{   
  2.     margin: 0;   
  3.     padding: 0;   
  4.     background-color#90da15;   
  5. }   
  6. .wrapp{   
  7.     positionabsolute;   
  8.     top: 50%;   
  9.     left: 50%;   
  10.     width600px;   
  11.     height300px;   
  12.     margin: -150px 0 0 -300px;   
  13.     -webkit-perspective: 30px;   
  14.     -webkit-transform: translateX(0px);   
  15.     -webkit-animation: wrapp 400ms 800ms ease-in forwards;   
  16.   
  17.     -moz-perspective: 30px;   
  18.     -moz-transform: translateX(0px);   
  19.     -moz-animation: wrapp 400ms 800ms ease-in forwards;   
  20.   
  21.     -ms-perspective: 30px;   
  22.     -ms-transform: translateX(0px);   
  23.     -ms-animation: wrapp 400ms 800ms ease-in forwards;   
  24.   
  25.     perspective: 30px;   
  26.     transform: translateX(0px);   
  27.     animation: wrapp 400ms 800ms ease-in forwards;   
  28. }   
  29. .text{   
  30.     positionabsolute;   
  31.     top: 50%;   
  32.     left: 50%;   
  33.     width0px;   
  34.     height60px;   
  35.     margin: -30px 0 0 -160px;   
  36.     overflowhidden;   
  37.     -webkit-transform: translateX(0px);   
  38.     -webkit-animation: text 400ms 800ms linear forwards;   
  39.   
  40.     -moz-transform: translateX(0px);   
  41.     -moz-animation: text 400ms 800ms linear forwards;   
  42.   
  43.     -ms-transform: translateX(0px);   
  44.     -ms-animation: text 400ms 800ms linear forwards;   
  45.   
  46.     transform: translateX(0px);   
  47.     animation: text 400ms 800ms linear forwards;   
  48. }   
  49. h1{   
  50.     floatrightright;   
  51.     font-family"Segoe UI", Frutiger, "Frutiger Linotype""Dejavu Sans""Helvetica Neue"Arialsans-serif;   
  52.     font-weightnormal;   
  53.     color#fff;   
  54.     padding: 0;   
  55.     margin: 0;   
  56.     width320px;   
  57.     height60px;   
  58.     font-size60px;   
  59.     line-height60px;   
  60. }   
  61. .logo{   
  62.     positionabsolute;   
  63.     top: 50%;   
  64.     left: 50%;   
  65.     width90px;   
  66.     height90px;   
  67.     margin: -45px 0 0 -45px;   
  68.     background-color#fff;   
  69.     -webkit-transform: translateX(0px) rotateY(10deg);   
  70.     -webkit-animation: logo 500ms 300ms ease-out forwards;   
  71.   
  72.     -moz-transform: translateX(0px) rotateY(10deg);   
  73.     -moz-animation: logo 500ms 300ms ease-out forwards;   
  74.   
  75.     -ms-transform: translateX(0px) rotateY(10deg);   
  76.     -ms-animation: logo 500ms 300ms ease-out forwards;   
  77.   
  78.     transform: translateX(0px) rotateY(10deg);   
  79.     animation: logo 500ms 300ms ease-out forwards;   
  80. }   
  81. .logo .top-left{   
  82.     positionabsolute;   
  83.     top: 0;   
  84.     left: 0;   
  85.     width44px;   
  86.     height44px;   
  87.     border-rightsolid 2px #90da15;   
  88.     border-bottomsolid 2px #90da15;   
  89. }   
  90. .logo .bottombottom-rightright{   
  91.     positionabsolute;   
  92.     bottombottom: 0;   
  93.     rightright: 0;   
  94.     width44px;   
  95.     height44px;   
  96.     border-leftsolid 2px #90da15;   
  97.     border-topsolid 2px #90da15;   
  98. }   
  99.   
  100. @-webkit-keyframes logo {   
  101.     from {   
  102.         -webkit-transform:  translateX(0px) rotateY(10deg);   
  103.     }   
  104.     to {   
  105.         -webkit-transform:  translateX(0px) rotateY(-10deg);   
  106.     }   
  107. }   
  108. @-webkit-keyframes text {   
  109.     from {   
  110.         width0px;   
  111.         -webkit-transform: translateX(0px);   
  112.     }   
  113.     60%{   
  114.         width0px;   
  115.     }   
  116.     to {   
  117.         width320px;   
  118.         -webkit-transform: translateX(240px);   
  119.     }   
  120. }   
  121. @-webkit-keyframes wrapp {   
  122.     from {   
  123.         -webkit-transform: translateX(0px);   
  124.     }   
  125.     to {   
  126.         -webkit-transform: translateX(-200px);   
  127.     }   
  128. }   
  129. @-moz-keyframes logo {   
  130.     from {   
  131.         -moz-transform:  translateX(0px) rotateY(10deg);   
  132.     }   
  133.     to {   
  134.         -moz-transform:  translateX(0px) rotateY(-10deg);   
  135.     }   
  136. }   
  137. @-moz-keyframes text {   
  138.     from {   
  139.         width0px;   
  140.         -moz-transform: translateX(0px);   
  141.     }   
  142.     60%{   
  143.         width0px;   
  144.     }   
  145.     to {   
  146.         width320px;   
  147.         -moz-transform: translateX(240px);   
  148.     }   
  149. }   
  150. @-moz-keyframes wrapp {   
  151.     from {   
  152.         -moz-transform: translateX(0px);   
  153.     }   
  154.     to {   
  155.         -moz-transform: translateX(-200px);   
  156.     }   
  157. }   
  158.   
  159. @-ms-keyframes logo {   
  160.     from {   
  161.         -ms-transform:  translateX(0px) rotateY(10deg);   
  162.     }   
  163.     to {   
  164.         -ms-transform:  translateX(0px) rotateY(-10deg);   
  165.     }   
  166. }   
  167. @-ms-keyframes text {   
  168.     from {   
  169.         width0px;   
  170.         -ms-transform: translateX(0px);   
  171.     }   
  172.     60%{   
  173.         width0px;   
  174.     }   
  175.     to {   
  176.         width320px;   
  177.         -ms-transform: translateX(240px);   
  178.     }   
  179. }   
  180. @-ms-keyframes wrapp {   
  181.     from {   
  182.         -ms-transform: translateX(0px);   
  183.     }   
  184.     to {   
  185.         -ms-transform: translateX(-200px);   
  186.     }   
  187. }   
  188. @keyframes logo {   
  189.     from {   
  190.         transform:  translateX(0px) rotateY(10deg);   
  191.     }   
  192.     to {   
  193.         transform:  translateX(0px) rotateY(-10deg);   
  194.     }   
  195. }   
  196. @keyframes text {   
  197.     from {   
  198.         width0px;   
  199.         transform: translateX(0px);   
  200.     }   
  201.     60%{   
  202.         width0px;   
  203.     }   
  204.     to {   
  205.         width320px;   
  206.         transform: translateX(240px);   
  207.     }   
  208. }   
  209. @keyframes wrapp {   
  210.     from {   
  211.         transform: translateX(0px);   
  212.     }   
  213.     to {   
  214.         transform: translateX(-200px);   
  215.     }   
  216. }  
HTML / CSS 相关文章推荐
CSS3中Transform动画属性用法详解
Jul 04 HTML / CSS
css3一款3D字体带阴影效果的实现步骤
Mar 20 HTML / CSS
CSS图片翻转动画技术详解(IE也实现了)
Apr 03 HTML / CSS
一款利用纯css3实现的win8加载动画的实例分析
Dec 11 HTML / CSS
全方位了解CSS3的Regions扩展
Aug 07 HTML / CSS
浅谈CSS3 动画卡顿解决方案
Jan 02 HTML / CSS
浅谈HTML5 &amp; CSS3的新交互特性
Jul 19 HTML / CSS
HTML5 manifest离线缓存的示例代码
Aug 08 HTML / CSS
html5 canvas的绘制文本自动换行的示例代码
Sep 17 HTML / CSS
总结html5自定义属性有哪些
Apr 01 HTML / CSS
HTML5获取当前地理位置并在百度地图上展示的实例
Jul 10 HTML / CSS
详解如何解决H5开发使用wx.hideMenuItems无效果不生效
Jan 20 HTML / CSS
一款纯css3实现的tab选项卡的实列教程
Dec 11 #HTML / CSS
纯css3实现的竖形无限级导航
Dec 10 #HTML / CSS
CSS3动画效果回调处理详解
Dec 10 #HTML / CSS
CSS3属性background-size使用指南
Dec 09 #HTML / CSS
CSS3属性box-shadow使用指南
Dec 09 #HTML / CSS
CSS3属性box-sizing使用指南
Dec 09 #HTML / CSS
使用css3实现的tab选项卡代码分享
Dec 09 #HTML / CSS
You might like
php smarty 二级分类代码和模版循环例子
2011/06/16 PHP
PHP中集成PayPal标准支付的实现方法分享
2012/02/06 PHP
基于php和mysql的简单的dao类实现crud操作功能
2014/01/27 PHP
php实现自定义中奖项数和概率的抽奖函数示例
2017/05/26 PHP
PHP错误处理函数register_shutdown_function使用示例
2017/07/03 PHP
jquery中load方法的用法及注意事项说明
2014/02/22 Javascript
JS对文本框值的判断示例
2014/03/10 Javascript
DOM基础教程之使用DOM
2015/01/19 Javascript
javascript 闭包详解
2015/02/15 Javascript
jquery实现滑屏大图定时收缩为小banner图片的广告代码
2015/09/02 Javascript
在页面中输出当前客户端时间javascript实例代码
2016/03/02 Javascript
vue插件tab选项卡使用小结
2016/10/27 Javascript
基于vue2.0+vuex+localStorage开发的本地记事本示例
2017/02/28 Javascript
微信小程序商城项目之购物数量加减(3)
2017/04/17 Javascript
jQuery中 DOM节点操作方法大全
2017/10/12 jQuery
react-router browserHistory刷新页面404问题解决方法
2017/12/29 Javascript
js的对象与函数详解
2019/01/21 Javascript
微信小程序如何使用globalData的方法
2019/06/06 Javascript
[49:08]完美世界DOTA2联赛PWL S2 LBZS vs FTD.C 第一场 11.27
2020/12/01 DOTA
Python运行的17个时新手常见错误小结
2012/08/07 Python
python 多进程通信模块的简单实现
2014/02/20 Python
深入理解python函数递归和生成器
2016/06/06 Python
Ubuntu 下 vim 搭建python 环境 配置
2017/06/12 Python
PyCharm在win10的64位系统安装实例
2017/11/26 Python
Python将多个excel表格合并为一个表格
2021/02/22 Python
Python的bit_length函数来二进制的位数方法
2019/08/27 Python
python实现加密的方式总结
2020/01/19 Python
通过Python扫描代码关键字并进行预警的实现方法
2020/05/24 Python
TensorFlow实现模型断点训练,checkpoint模型载入方式
2020/05/26 Python
Python实现初始化不同的变量类型为空值
2020/06/02 Python
python中如何使用虚拟环境
2020/10/14 Python
丹尼尔惠灵顿手表天猫官方旗舰店:Daniel Wellington
2017/08/25 全球购物
第一批党的群众路线教育实践活动总结报告
2014/07/03 职场文书
建筑安全生产责任书
2014/07/22 职场文书
餐饮服务员岗位职责
2015/02/09 职场文书
公司会议开幕词
2016/03/03 职场文书