一款利用纯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 相关文章推荐
Web页面中八种创建多列等高(等高列布局)的实现技术
Dec 24 HTML / CSS
分享CSS3制作卡片式图片的方法
Jul 08 HTML / CSS
CSS3实现时间轴效果
Jul 11 HTML / CSS
CSS3 按钮边框动画的实现
Nov 12 HTML / CSS
详解利用canvas实现环形进度条的方法
Jun 12 HTML / CSS
html5菜单折纸效果
Apr 22 HTML / CSS
用HTML5 实现橡皮擦的涂抹效果的教程
May 11 HTML / CSS
HTML5对比HTML4的主要改变和改进总结
May 27 HTML / CSS
HTML5 localStorage使用总结
Feb 22 HTML / CSS
HTML5 Canvas实现360度全景图的示例代码
Jan 29 HTML / CSS
AmazeUI 加载进度条的实现示例
Aug 20 HTML / CSS
CSS3 制作的彩虹按钮样式
Apr 11 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 Memcached + APC + 文件缓存封装实现代码
2010/03/11 PHP
php session和cookie使用说明
2010/04/07 PHP
关于使用coreseek并为其做分页的介绍
2013/06/21 PHP
php简单smarty入门程序实例
2015/06/11 PHP
PHP简单日历实现方法
2016/07/20 PHP
Lumen timezone 时区设置方法(慢了8个小时)
2018/01/20 PHP
PHP实现搜索时记住状态的方法示例
2018/05/11 PHP
jquery 入门教程 [翻译] 推荐
2009/08/17 Javascript
基于jquery的设置页面文本框 只能输入数字的实现代码
2011/04/19 Javascript
yui3的AOP(面向切面编程)和OOP(面向对象编程)
2015/05/01 Javascript
实例详解JSON数据格式及json格式数据域字符串相互转换
2016/01/07 Javascript
Bootstrap 设置datetimepicker在屏幕上面弹出设置方法
2017/03/21 Javascript
Vue 2中ref属性的使用方法及注意事项
2017/06/12 Javascript
Vue组件选项props实例详解
2017/08/18 Javascript
在vue项目中使用md5加密的方法
2018/09/14 Javascript
react native 原生模块桥接的简单说明小结
2019/02/26 Javascript
使用watch在微信小程序中实现全局状态共享
2019/06/03 Javascript
Vue+Vuex实现自动登录的知识点详解
2020/03/04 Javascript
解析Python中的异常处理
2015/04/28 Python
Python中__init__.py文件的作用详解
2016/09/18 Python
python实现百万答题自动百度搜索答案
2018/01/16 Python
python3使用matplotlib绘制条形图
2020/03/25 Python
Python学习笔记基本数据结构之序列类型list tuple range用法分析
2019/06/08 Python
Pycharm新手教程(只需要看这篇就够了)
2019/06/18 Python
Python + selenium + crontab实现每日定时自动打卡功能
2020/03/31 Python
python将YUV420P文件转PNG图片格式的两种方法
2021/01/22 Python
基于CSS3实现的几个小loading效果
2018/09/27 HTML / CSS
用CSS3实现无限循环的无缝滚动的示例代码
2017/11/01 HTML / CSS
英国探险旅游专家:Explore
2018/12/20 全球购物
光盘行动倡议书
2014/02/02 职场文书
社团招新策划书
2014/02/04 职场文书
董事长助理岗位职责
2014/02/18 职场文书
《生命 生命》教学反思
2014/04/19 职场文书
计算机网络及管理学专业求职信
2014/06/05 职场文书
2016大学生党校学习心得体会
2016/01/06 职场文书
《水浒传》读后感3篇(范文)
2019/09/19 职场文书