书签 分享 收藏 举报 版权申诉 / 36

类型HTML5jQuery制作温馨浪漫爱心表白动画特效.docx

  • 文档编号:230720
  • 上传时间:2022-10-07
  • 格式:DOCX
  • 页数:36
  • 大小:39.89KB

亲爱的,这是我们相爱在一起的时光。

爱你直到永永远远。


-爱你的人

....

....

varoffsetX=$("#loveHeart").width()/2;

varoffsetY=$("#loveHeart").height()/2-55;

vartogether=newDate();

together.setFullYear(2013,2,28);

together.setHours(20);

together.setMinutes(0);

together.setSeconds(0);

together.setMilliseconds(0);

if(!

document.createElement('canvas').getContext){

varmsg=document.createElement("div");

msg.id="errorMsg";

msg.innerHTML="Yourbrowserdoesn'tsupportHTML5!


RecommenduseChrome14+/IE9+/Firefox7+/Safari4+";

document.body.appendChild(msg);

$("#code").css("display","none")

$("#copyright").css("position","absolute");

$("#copyright").css("bottom","10px");

document.execCommand("stop");

}else{

setTimeout(function(){

startHeartAnimation();

},5000);

timeElapse(together);

setInterval(function(){

timeElapse(together);

},500);

adjustCodePosition();

$("#code").typewriter();

}

Function.js

var$window=$(window),gardenCtx,gardenCanvas,$garden,garden;

varclientWidth=$(window).width();

varclientHeight=$(window).height();

$(function(){

//setupgarden

$loveHeart=$("#loveHeart");

varoffsetX=$loveHeart.width()/2;

varoffsetY=$loveHeart.height()/2-55;

$garden=$("#garden");

gardenCanvas=$garden[0];

gardenCanvas.width=$("#loveHeart").width();

gardenCanvas.height=$("#loveHeart").height()

gardenCtx=gardenCanvas.getContext("2d");

gardenCtx.globalCompositeOperation="lighter";

garden=newGarden(gardenCtx,gardenCanvas);

$("#content").css("width",$loveHeart.width()+$("#code").width());

$("#content").css("height",Math.max($loveHeart.height(),$("#code").height()));

$("#content").css("margin-top",Math.max(($window.height()-$("#content").height())/2,10));

$("#content").css("margin-left",Math.max(($window.width()-$("#content").width())/2,10));

//renderLoop

setInterval(function(){

garden.render();

},Garden.options.growSpeed);

});

$(window).resize(function(){

varnewWidth=$(window).width();

varnewHeight=$(window).height();

if(newWidth!

=clien

举报
举报
版权申诉
版权申诉
word格式文档无特别注明外均可编辑修改;预览文档经过压缩,下载后原文更清晰! 立即下载
配套讲稿:

如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。

特殊限制:

部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。

关 键  词:
HTML5jQuery 制作 温馨 浪漫 爱心 表白 动画 特效
提示  冰豆网所有资源均是用户自行上传分享,仅供网友学习交流,未经上传用户书面授权,请勿作他用。
关于本文
本文标题:HTML5jQuery制作温馨浪漫爱心表白动画特效.docx
链接地址:https://www.bdocx.com/doc/230720.html
关于我们 - 网站声明 - 网站地图 - 资源地图 - 友情链接 - 网站客服 - 联系我们

copyright@ 2008-2022 冰点文档网站版权所有

经营许可证编号:鄂ICP备2022015515号-1

收起
展开