用jQuery实现具有伸缩功能的动画图片

来源:互联网 发布:dobot源码 编辑:程序博客网 时间:2024/04/29 10:23
<!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>    <title>chainning code</title><script language="javascript" src="jquery-1.4.min.js"></script><script type="text/javascript">  $(document).ready(function(){    $("#show").click(function () {      var n = $("div").queue("fx");      $("span").text("Queue length is: " + n.length);    });    function runIt() {      $("div").show("slow");      $("div").animate({left:'+=0'},5000);      $("div").animate({left:'-=0'},1000);      $("div").hide("slow");    }    runIt();  });</script>  <style>  div { margin:3px; width:1000px; height:500px;        position:absolute; left:0px; top:0px;        background:green; display:none; }  div.newcolor { background:blue; }  span { color:red; }  </style><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /></head><body>    <div  id="show" class="panel"><img name="" src="b.jpg" width="1000" height="500" alt="美女" /></div></body></html>
0 0
原创粉丝点击