首页 >web前端 >html教程 >跨平台移动开发 Xuijs超轻量级的框架+Emile CSS动画_html/css_WEB-ITnose

跨平台移动开发 Xuijs超轻量级的框架+Emile CSS动画_html/css_WEB-ITnose

WBOY
WBOY原创
2016-06-24 12:35:011447浏览

 Xuijs超轻量级的框架+Emile CSS动画效果图

 

 

示例代码

 

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><title>XuijsDemo</title><script src="content/scripts/xui-2.2.0.min.js"></script><script src="content/scripts/emile.js"></script><script>function initialise(){}//style  样式处理function styleshow(){  }//style 动画、形变、渐变function fx(){  emile('box1', 'background:#008FFF;left:100px;padding-bottom:100px;opacity:1', {     duration: 4000, easing: bounce  });  emile('box2', 'background:#C8E919;left:200px;padding-bottom:100px;opacity:1', {     duration: 4000, easing: bounce  });    emile('box3', 'background:#AC193D;left:300px;top:400px;padding-bottom:100px;opacity:1', {     duration: 4000, easing: bounce  });      emile('box4', 'background:#008FFF;right:400px;padding-bottom:100px;opacity:1', {     duration: 4000, easing: bounce  });  emile('box5', 'background:#C8E919;right:150px;padding-bottom:100px;opacity:1', {     duration: 4000, easing: bounce  });    emile('box6', 'background:#AC193D;right:350px;top:200px;padding-bottom:100px;opacity:1', {     duration: 4000, easing: bounce  });     emile('boxb', 'left:500px;padding:10px;border:50px solid #5133AB', {    duration: 500,    after: function(){      emile('boxa', 'background:#D24726;left:100px;padding-bottom:100px;opacity:1', {         duration: 4000, easing: bounce      });    }  });}function bounce(pos) {    if (pos < (1/2.75)) {        return (7.5625*pos*pos);    } else if (pos < (2/2.75)) {        return (7.5625*(pos-=(1.5/2.75))*pos + .75);    } else if (pos < (2.5/2.75)) {        return (7.5625*(pos-=(2.25/2.75))*pos + .9375);    } else {        return (7.5625*(pos-=(2.625/2.75))*pos + .984375);    }  }</script></head><body onload="initialise();styleshow();fx();"><div id="box1" style="position:absolute;left:0px;background:#f00;opacity:0">DIV动画区域块</div><div id="box2" style="border:0px solid #00ff00;position:absolute;left:0px;top:200px;background:#000000">DIV动画区域块</div><div id="box3" style="border:0px solid #AC193D;position:absolute;left:0px;top:300px;background:#AC193D">DIV动画区域块</div><div id="box4" style="position:absolute;right:0px;background:#f00;opacity:0">DIV动画区域块</div><div id="box5" style="border:0px solid #00ff00;position:absolute;right:0px;top:200px;background:#000000">DIV动画区域块</div><div id="box6" style="border:0px solid #AC193D;position:absolute;right:0px;top:150px;background:#AC193D">DIV动画区域块</div><div id="boxa" style="position:absolute;left:0px;background:#D24726;opacity:0">DIV</div><div id="boxb" style="border:0px solid #00ff00;position:absolute;left:0px;top:350px;background:#362168">DIV动画区域块</div></body></html>

 

代码示例包

 

点击下载

 

 

声明:本博客高度重视知识产权保护,发现本博客发布的信息包含有侵犯其著作权的链接内容时,请联系我,我将第一时间做相应处理,联系邮箱ffgign@qq.com。

 


作者:Mark Fan (小念头)    来源:http://cube.cnblogs.com
说明:未经作者同意必须保留此段声明,且在文章页面明显位置给出原文连接,否则保留追究法律责任的权利。如有疑问,可以通过 ffgign@qq.com 联系作者,本文章采用 知识共享署名-非商业性使用-相同方式共享 2.5 中国大陆许可协议进行许可

 

 

声明:
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系admin@php.cn