JQuery 淡入淡出3

<title>jQuery fadeIn() 方法</title>
<script src="JQ/jquery.js"></script>
<script>
	
$(document).ready(function(){

  $("button").click(function(){  /*获取button点击*/
    $("#div1").fadeIn(100);       
    $("#div2").fadeIn("slow");   /*获取元素  淡出时间*/
    $("#div3").fadeIn(3000);
  });
});
</script>
<style type="text/css">
  *{ margin:0 auto; padding:0;}
</style>
</head>

<body>
<h1 align="center">Demonstrate fadeIn() with different parameters.</h1>
<button>Click to fade in boxes</button>


<br><br>
<div id="div1" style="width:80px;height:80px;display:none;background-color:red;"></div><br>
<div id="div2" style="width:80px;height:80px;display:none;background-color:green;"></div><br>
<div id="div3" style="width:80px;height:80px;display:none;background-color:blue;"></div>

你可能感兴趣的:(jquery,淡入淡出)