亚洲国产日韩欧美一区二区三区,精品亚洲国产成人av在线,国产99视频精品免视看7,99国产精品久久久久久久成人热,欧美日韩亚洲国产综合乱

animate()動漫效果重要的事靈活運用css

原創(chuàng) 2018-11-19 02:57:41 242
摘要:<!DOCTYPE html><html><head> <title></title> <script type="text/javascript" src="jquery-3.3.1.js"></script> <style type="text/css&q
<!DOCTYPE html>
<html>
<head>
<title></title>
<script type="text/javascript" src="jquery-3.3.1.js"></script>
<style type="text/css">
div{
height: 200px;
width: 200px;
background: blue;
position: absolute;
}
</style>
<script type="text/javascript">
   $(document).ready(function(){
   	$('#bt1').click(function(){
   	$('p').animate({fontSize:"50px"},1500)//屬性名稱font-size都寫成駝峰寫法fontSize
   	})
   	$('#bt2').click(function(){
   	$('div').animate({//left:"500px"
        //opacity:0.3;//透明度
        //height:300px
        //width:300px
        ////height:'toggle';
         width:'toggle'

   	},1500)//屬性名稱font-size都寫成駝峰寫法fontSize

   	})
   })
</script>
</head>
<body>
<button id="bt1">點擊字體放大</button>
<p>jQuery中我們使用 animate()方法創(chuàng)建自定義的動畫</p>

<button  id="bt2">點擊移動div</button>
<div></div>
</body>
</html>


發(fā)布手記

熱門詞條