纯js打造html5表白模板_第1页
免费预览已结束,剩余9页可下载查看

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

1、纯js打造html5表白模板html代码如下:复制代码 代码如下:程序员用html5制作的爱心树表明动画- 柯乐义本页面采纳html5技术,目前您的扫瞄器无法显示,请用法支持html5的扫瞄器查看本页。(function()var canvas=$(&39;ke&39;+&39;leyi&39;);if (!canvas0.getcontext) $("error")。show();return false; var width=canvas.width();var height=canvas.height();canvas.

2、attr("width", width);canvas.attr("height", height);var opts=seed: x: width / 2 - 20,color: "rgb(190, 26, 37)",scale: 2,branch: 535, 680, 570, 250, 500, 200, 30, 100, 540, 500, 455, 417, 340, 400, 13, 100, 450, 435, 434, 430, 394, 395, 2, 40,550,

3、445, 600, 356, 680, 345, 12, 100, 578, 400, 648, 409, 661, 426, 3, 80,539, 281, 537, 248, 534, 217, 3, 40,546, 397, 413, 247, 328, 244, 9, 80, 427, 286, 383, 253, 371, 205, 2, 40,498, 345, 435, 315, 395, 330, 4, 60,546, 357, 608, 252, 678, 221, 6, 100, 590, 293, 646, 277, 648, 271, 2, 80,bloom: num:

4、 700,width: 1080,height: 650,footer: width: 1200,height: 5,speed: 10,var tree=new tree(canvas0, width, height, opts);var seed=tree.seed;var foot=tree.footer;var hold=1;canvas.click(function(e) var offset=canvas.offset(), x, y;x=e.pagex - offset.left;y=e.pagey - offset.top;if (seed.hover(x, y) hold=0

5、;canvas.unbind("click");canvas.unbind("mousemove");canvas.removeclass(&39;hand&39;);)。mousemove(function(e)var offset=canvas.offset(), x, y;x=e.pagex - offset.left;y=e.pagey - offset.top;canvas.toggleclass(&39;hand&39;, seed.hover(x, y););var seeda

6、nimate=eval(jpile("async", function () seed.draw();while (hold) $await(jscex.async.sleep(10);while (seed.canscale() seed.scale(0.95);$await(jscex.async.sleep(10);while (seed.canmove() seed.move(0, 2);foot.draw();$await(jscex.async.sleep(10););var growanimate=eval(jpile("as

7、ync", function () do tree.grow();$await(jscex.async.sleep(10); while (tree.cangrow(););var flowanimate=eval(jpile("async", function () do tree.flower(2);$await(jscex.async.sleep(10); while (tree.canflower(););var moveanimate=eval(jpile("async", function (

8、) tree.snapshot("p1", 240, 0, 610, 680);while (tree.move("p1", 500, 0) foot.draw();$await(jscex.async.sleep(10);foot.draw();tree.snapshot("p2", 500, 0, 610, 680);/ 会有闪耀不自得这样做, ()canvas.parent()。css("background", "url(&a

9、mp;quot; + tree.todataurl(&39;image/png&39;) + ")");canvas.css("background", "ffe");$await(jscex.async.sleep(300);canvas.css("background", "none"););var jumpanimate=eval(jpile("async",

10、 function () var ctx=tree.ctx;while (true) tree.ctx.clearrect(0, 0, width, height);tree.jump();foot.draw();$await(jscex.async.sleep(25););var textanimate=eval(jpile("async", function () $("code")。show()。typewriter(););var runasync=eval(jpile("async", function () $await(seedanimate();$await(growanimate();$await(flowanimate();$awa

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论