js实现泡泡球体粒子碰撞物理效果动画代码
代码语言:html
所属分类:动画
代码描述:js实现泡泡球体粒子碰撞物理效果动画代码
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!doctype html> <html> <head> <title></title> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <style type="text/css"> body { margin: 0; padding: 0; text-align: center; } #screen { width: 800px; height: 640px; position: relative; background: #ccccff; margin: 0 auto; vertical-align: bottom } #inner { position: absolute; left: 0px; top: 0px; width: 100%; height: 100%; } #screen p { color: white; font: bold 14px; } .one { background: url('//repo.bfw.wiki/bfwrepo/image/5ee066dfc258a.png') no-repeat; background-size: 100% auto; } .two { background: url('//repo.bfw.wiki/bfwrepo/image/5ee066dfc258a.png') no-repeat; background-size: auto 100%; } .three { background: url('//repo.bfw.wiki/bfwrepo/image/5ee066f78ffb9.png') no-repeat; background-size: auto 100%; } .four { background: url('//repo.bfw.wiki/bfwrepo/image/5ee066f78ffb9.png') no-repeat; background-size: auto 100%; } .five { background: url('//repo.bfw.wiki/bfwrepo/image/5ee067089ab98.png') no-repeat; background-size: auto 100%; } .six { background: url('//repo.bfw.wiki/bfwrepo/image/5ee067089ab98.png') no-repeat; background-size: auto 100%; } .seven { background: url('//repo.bfw.wiki/bfwrepo/image/5ee066f78ffb9.png') no-repeat; background-size: auto 100%; } .eight { background: url('//repo.bfw.wiki/bfwrepo/image/5ee066f78ffb9.png') no-repeat; background-size: auto 100%; } .nine { background: url('//repo.bfw.wiki/bfwrepo/image/5ee067089ab98.png') no-repeat; background-size: auto 100%; } .ten { background: url('//repo.bfw.wiki/bfwrepo/image/5ee067089ab98.png') no-repeat; background-size: auto 100%; } </style> </head> <body> <div id="screen"> <div id="inner"> <div class="one"></div> <div class="two"></div> <div class="three"></div> <div class="four"></div> <div class="five"></div> <div class="six"></div> <div class="seven"></div> <div class="eight"></div> <div class="nine"></div> <div class="ten"></div> </div> </div> <input type="button" id="start" value="start"> <input type="button" id="stop" value="stop"> <br><br><br> <script> var getFlag = function (id) { return document.getElementById(id); //获取元素引用 } var extend = function(des, src) { for (p in src) { des[p] = src[p]; .........完整代码请登录后点击上方下载按钮下载查看
网友评论0