• linkedu视频
  • 平面设计
  • 电脑入门
  • 操作系统
  • 办公应用
  • 电脑硬件
  • 动画设计
  • 3D设计
  • 网页设计
  • CAD设计
  • 影音处理
  • 数据库
  • 程序设计
  • 认证考试
  • 信息管理
  • 信息安全
菜单
linkedu.com专业计算机教程网站
  • 网页制作
  • 数据库
  • 程序设计
  • 操作系统
  • CMS教程
  • 游戏攻略
  • 脚本语言
  • 平面设计
  • 软件教程
  • 网络安全
  • 电脑知识
  • 服务器
  • 视频教程
  • html/xhtml
  • html5
  • CSS
  • XML/XSLT
  • Dreamweaver教程
  • Frontpage教程
  • 心得技巧
  • bootstrap
  • vue
  • AngularJS
  • HBuilder教程
  • css3
  • 浏览器兼容
  • div/css
  • 网页编辑器
  • axure
您的位置:首页 > 网页设计 >html5 > HTML5模拟齿轮动画代码实例

HTML5模拟齿轮动画代码实例

作者:匿名 字体:[增加 减小] 来源:互联网 时间:2018-12-03

本文主要包含HTML5,齿轮动画等相关知识,匿名希望在学习及工作中可以帮助到您
这是一个基于HTML5的齿轮动画特效,我们将齿轮转动的物理学原理,转换为HTML5代码,在网页上实现了模拟齿轮转动的动画效果。该齿轮动画的最大特点是它由好多个齿轮组成,这对齿轮传动的算法要求就大大提高了,而且我们并没有用JavaScript,而是纯CSS3实现的。

<DIV id=level> <DIV id=content> <DIV id=gears> <DIV id=gears-static><FONT size=3></FONT></DIV> <DIV id=gear-system-1> <DIV id=shadow15 class=shadow><FONT size=3></FONT></DIV> <DIV id=gear15><FONT size=3></FONT></DIV> <DIV id=shadow14 class=shadow><FONT size=3></FONT></DIV> <DIV id=gear14><FONT size=3></FONT></DIV> <DIV id=shadow13 class=shadow><FONT size=3></FONT></DIV> <DIV id=gear13><FONT size=3></FONT></DIV> </DIV> <DIV id=gear-system-2> <DIV id=shadow10 class=shadow><FONT size=3></FONT></DIV> <DIV id=gear10><FONT size=3></FONT></DIV> <DIV id=shadow3 class=shadow><FONT size=3></FONT></DIV> <DIV id=gear3><FONT size=3></FONT></DIV> </DIV> <DIV id=gear-system-3> <DIV id=shadow9 class=shadow><FONT size=3></FONT></DIV> <DIV id=gear9><FONT size=3></FONT></DIV> <DIV id=shadow7 class=shadow><FONT size=3></FONT></DIV> <DIV id=gear7><FONT size=3></FONT></DIV> </DIV> <DIV id=gear-system-4> <DIV id=shadow6 class=shadow><FONT size=3></FONT></DIV> <DIV id=gear6><FONT size=3></FONT></DIV> <DIV id=gear4><FONT size=3></FONT></DIV> </DIV> <DIV id=gear-system-5> <DIV id=shadow12 class=shadow><FONT size=3></FONT></DIV> <DIV id=gear12><FONT size=3></FONT></DIV> <DIV id=shadow11 class=shadow><FONT size=3></FONT></DIV> <DIV id=gear11><FONT size=3></FONT></DIV> <DIV id=shadow8 class=shadow><FONT size=3></FONT></DIV> <DIV id=gear8><FONT size=3></FONT></DIV> </DIV> <DIV id=shadow1 class=shadow><FONT size=3></FONT></DIV> <DIV id=gear1><FONT size=3></FONT></DIV> <DIV id=gear-system-6> <DIV id=shadow5 class=shadow><FONT size=3></FONT></DIV> <DIV id=gear5><FONT size=3></FONT></DIV> <DIV id=gear2><FONT size=3></FONT></DIV> </DIV> <DIV id=shadowweight class=shadow><FONT size=3></FONT></DIV> <DIV id=chain-circle><FONT size=3></FONT></DIV> <DIV id=chain><FONT size=3></FONT></DIV> <DIV id=weight><FONT size=3></FONT></DIV> </DIV> </DIV> </DIV>

css代码

<FONT size=3>#level{
width:100%;
height:1px;
position:absolute;
top:50%;
}
#content{
text-align:center;
margin-top:-327px;
}
#gears{
width:478px;
height:655px;
position:relative;
display:inline-block;
vertical-align:middle;
}
#gears-static{
background:url(FgFnjks.png) no-repeat -363px -903px;
width:329px;
height:602px;
position:absolute;
bottom:5px;
right:0px;
opacity:0.4;
}
#title{
vertical-align:middle;
color:#9EB7B5;
width:43%;
display:inline-block;
}
#title h1{
font-family: 'PTSansNarrowBold', sans-serif;
font-size:3.6em;
text-shadow:rgba(0, 0, 0, 0.36) 7px 7px 10px;
}
#title p{
font-family: sans-serif;
font-size:1.2em;
line-height:148%;
text-shadow:rgba(0, 0, 0, 0.36) 1px 1px 0px;
}
.shadow{
-webkit-box-shadow: 4px 7px 25px 10px rgba(43, 36, 0, 0.36);
-moz-box-shadow: 4px 7px 25px 10px rgba(43, 36, 0, 0.36);
box-shadow: 4px 7px 25px 10px rgba(43, 36, 0, 0.36);
}
/*gear-system-1*/
#gear15{
background: url(FgFnjks.png) no-repeat 0 -993px;
width: 321px;
height: 321px;
position:absolute;
left:45px;
top:179px;
-webkit-animation: rotate-back 24000ms linear infinite;
-moz-animation: rotate-back 24000ms linear infinite;
-ms-animation: rotate-back 24000ms linear infinite;
animation: rotate-back 24000ms linear infinite;
}
#shadow15{
width:306px;
height:306px;
-webkit-border-radius:153px;
-moz-border-radius:153px;
border-radius:153px;
position:absolute;
left:52px;
top:186px;
}
#gear14{
background: url(FgFnjks.png) no-repeat 0 -856px;
width: 87px;
height: 87px;
position:absolute;
left:162px;
top:296px;
}
#shadow14{
width:70px;
height:70px;
-webkit-border-radius:35px;
-moz-border-radius:35px;
border-radius:35px;
position:absolute;
left:171px;
top:304px;
}
#gear13{
background: url(FgFnjks.png) no-repeat 0 -744px;
width: 62px;
height: 62px;
position:absolute;
left:174px;
top:309px;
-webkit-animation: rotate 8000ms linear infinite;
-moz-animation: rotate 8000ms linear infinite;
-ms-animation: rotate 8000ms linear infinite;
animation: rotate 8000ms linear infinite;
}
#shadow13{
width:36px;
height:36px;
-webkit-border-radius:18px;
-moz-border-radius:18px;
border-radius:18px;
position:absolute;
left:187px;
top:322px;
}
/*gear-system-2*/
#gear10{
background: url(FgFnjks.png) no-repeat 0 -184px;
width: 122px;
height: 122px;
position:absolute;
left:175px;
top:0;
-webkit-animation: rotate-back 8000ms linear infinite;
-moz-animation: rotate-back 8000ms linear infinite;
-ms-animation: rotate-back 8000ms linear infinite;
animation: rotate-back 8000ms linear infinite;
}
#shadow10{
width:86px;
height:86px;
-webkit-border-radius:43px;
-moz-border-radius:43px;
border-radius:43px;
position:absolute;
left:193px;
top:18px;
}
#gear3{
background: url(FgFnjks.png) no-repeat 0 -1493px;
width: 85px;
height: 84px;
position:absolute;
left:194px;
top:19px;
-webkit-animation: rotate 10000ms linear infinite;
-moz-animation: rotate 10000ms linear infinite;
-ms-animation: rotate 10000ms linear infinite;
animation: rotate 10000ms linear infinite;
}
#shadow3{
width:60px;
height:60px;
-webkit-border-radius:30px;
-moz-border-radius:30px;
border-radius:30px;
position:absolute;
left:206px;
top:31px;
}
/*gear-system-3*/
#gear9{
background: url(FgFnjks.png) no-repeat -371px -280px;
width: 234px;
height: 234px;
position:absolute;
left:197px;
top:96px;
-webkit-animation: rotate 12000ms linear infinite;
-moz-animation: rotate 12000ms linear infinite;
-ms-animation: rotate 12000ms linear infinite;
animation: rotate 12000ms linear infinite;
}
#shadow9{
width:200px;
height:200px;
-webkit-border-radius:100px;
-moz-border-radius:100px;
border-radius:100px;
position:absolute;
left:214px;
top:113px;
}
#gear7{
background: url(FgFnjks.png) no-repeat -371px 0;
width: 108px;
height: 108px;
position:absolute;
left:260px;
top:159px;
-webkit-animation: rotate-back 10000ms linear infinite;
-moz-animation: rotate-back 10000ms linear infinite;
-ms-animation: rotate-back 10000ms linear infinite;
animation: rotate-back 10000ms linear infinite;
}
#shadow7{
width:76px;
height:76px;
-webkit-border-radius:38px;
-moz-border-radius: 38px;
border-radius: 38px;
position:absolute;
left:276px;
top:175px;
}
/*gear-system-4*/
#gear6{
background: url(FgFnjks.png) no-repeat 0 -1931px;
width: 134px;
height: 134px;
position:absolute;
left:305px;
bottom:212px;
-webkit-animation: rotate-back 10000ms linear infinite;
-moz-animation: rotate-back 10000ms l
  


 

您可能想查找下面的文章:

  • HTML5知识点总结
  • HTML5的本地存储
  • HTML5本地存储之IndexedDB
  • Html5实现文件异步上传功能
  • Html5新标签datalist实现输入框与后台数据库数据的动态匹配
  • 详解HTML5 window.postMessage与跨域
  • HTML5拖放API实现拖放排序的实例代码
  • 解决html5中video标签无法播放mp4问题的办法
  • HTML5新特性 多线程(Worker SharedWorker)
  • Html5新增标签有哪些

相关文章

  • 2017-08-06HTML5的Geolocation地理位置定位API使用教程
  • 2018-12-03勤奋真的可以弥补天资的不足吗?
  • 2017-08-06HTML5安全介绍之内容安全策略(CSP)简介
  • 2017-08-06html5画布旋转效果示例
  • 2018-12-03HTML5自定义data-* data(obj)属性和jquery的data()方法的使用_html5教程技巧
  • 2018-12-03使用PHP和HTML5 FormData实现无刷新文件上传
  • 2018-12-03小强的HTML5移动开发之路(51)——jquerymobile中改善页面访问速度
  • 2018-12-03HTML5 Canvas动画效果图文代码演示
  • 2018-12-03 html5+php如何实现文件拖动上传功能
  • 2018-12-03zepto实现移动端无缝向上下滚动

文章分类

  • html/xhtml
  • html5
  • CSS
  • XML/XSLT
  • Dreamweaver教程
  • Frontpage教程
  • 心得技巧
  • bootstrap
  • vue
  • AngularJS
  • HBuilder教程
  • css3
  • 浏览器兼容
  • div/css
  • 网页编辑器
  • axure

最近更新的内容

    • html5 拖拽上传图片实例演示
    • h5的组织内容如何使用
    • HTML5在IE10、火狐下中文乱码问题的解决方法
    • 浅析HTML5中header标签的用法
    • 如何判断一款android应用是主要基于html5还是native控件开发
    • Web Component 与微软十五年前提出的 HTML Component 有什么区别和联系?
    • 避免常见的六种HTML5错误用法 (1)
    • HTML5中meta属性的使用方法
    • 详解html5图片上传支持图片预览压缩及进度显示兼容IE6及标准浏览器
    • HTML5本地存储之Database Storage应用介绍

关于我们 - 联系我们 - 免责声明 - 网站地图

©2020-2025 All Rights Reserved. linkedu.com 版权所有