先看看效果:http://keleyi.com/keleyi/phtml/jqtexiao/6.htm
胆小勿入!!!
以下为HTML代码:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><htmlxmlns="http://www.w3.org/1999/xhtml"><head><metahttp-equiv="Content-Type"content="text/html; charset=utf-8"/><title>万圣节快乐!!-柯乐义</title><styletype="text/CSS">body{margin:0px;background-image:url(http://keleyi.com/keleyi/phtml/jqtexiao/6/Halloween2013_Keleyi.jpg);background-repeat:no-repeat;background-color:#030303;background-position:center top;}.animate{margin-top:600px;height:130px;width:620px;margin-left:auto;margin-right:auto;background:url(http://keleyi.com/keleyi/phtml/jqtexiao/6/keleyiGhost.gif) no-repeat;background-position:-280px center;}</style><scripttype="text/javascript"src="http://keleyi.com/keleyi/pmedia/jquery/jquery-1.10.2.min.js"></script><scripttype="text/Javascript">$(functionguitiao() {
$("div#animate_kel"+"eyi_com").css({backgroundPosition:'-280px center'});
$("div#animate_ke"+"leyi_com").animate({ backgroundPosition:"620"},20232,guitiao);
});</script></head><body><divid="animate_keleyi_com"class="animate"></div><div><ahref="http://keleyi.com/a/bjac/438uwrmi.htm"target="_blank">原文</a></div></body></html>
http://keleyi.com/a/bjac/438uwrmi.htm
http://www.cnblogs.com/sosoft/p/kaifajishu.html