欧美bbbwbbbw肥妇,免费乱码人妻系列日韩,一级黄片

jQuery實(shí)現(xiàn)動(dòng)畫效果的簡單實(shí)例

 更新時(shí)間:2014年01月27日 08:50:02   作者:  
本篇文章主要是對(duì)jQuery實(shí)現(xiàn)動(dòng)畫效果的簡單實(shí)例進(jìn)行了介紹,需要的朋友可以過來參考下,希望對(duì)大家有所幫助

一、需求原因
目前jQuery已經(jīng)是一個(gè)比較成熟的框架了,而且基于他的插件也有上百種,本例我手動(dòng)用jQuery實(shí)現(xiàn)一個(gè)動(dòng)畫效果的例子。

二、具體實(shí)現(xiàn)

復(fù)制代碼 代碼如下:

<!DOCTYPE html PUBLIC "-//W3C//DTDHTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type"content="text/html; charset=UTF-8">
<title>jQuery實(shí)現(xiàn)動(dòng)畫效果</title>
<script language="JavaScript"src="../jQuery/jquery-1.7.1.min.js"></script>
<style type="text/css">
     #test {
         position:relative;
         width:100px;
         height:100px;
         border:1px solid #0050d0;
         background:#96e555;
          cursor:pointer;
     }
</style>
<script type="text/javascript">
     $(function(){
         $("#test").css("optcity","0.5");//設(shè)置不透明
         $("#test").click(function(){
              $(this).animate({left:"400px",height:"200px",opacity:"1"},300)
                      .animate({top:"200px",width:"200px"},300)
                      .fadeOut("slow");
         });
     });
</script>
</head>
<body>
     <div id="test"></div>
</body>
</html>

三、運(yùn)行結(jié)果

相關(guān)文章

最新評(píng)論