案例:jquery案例     状态:可编辑再运行    进入竖版
 运行结果 
x
 
1
<!DOCTYPE html>
2
<html>
3
<head>
4
<script src="/js/jquery-1.11.1.min.js"></script>
5
<script type="text/javascript">
6
$(document).ready(function(){
7
  $("button").click(function(){
8
    $("#div1").fadeOut();
9
    $("#div2").fadeOut("slow");
10
    $("#div3").fadeOut(3000);
11
  });
12
});
13
</script>
14
</head>
15
16
<body>
17
<p>演示带有不同参数的 fadeOut() 方法。</p>
18
<button>点击这里,使三个矩形淡出</button>
19
<br><br>
20
<div id="div1" style="width:80px;height:80px;background-color:red;"></div>
21
<br>
22
<div id="div2" style="width:80px;height:80px;background-color:green;"></div>
23
<br>
24
<div id="div3" style="width:80px;height:80px;background-color:blue;"></div>
25
</body>
26
27
</html>
28