1.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Document</title>
<script type="text/javascript" src="http://apps.bdimg.com/libs/jquery/2.1.4/jquery.min.js"></script>
<script type="text/javascript">
$(document).ready(function() {
$("button").click(function() {
$("#div1").fadeOut();
$("#div2").fadeOut("slow");
$("#div3").fadeOut(3000);
});
});
</script>
</head>
<body>
<p>演示带有不同参数的fadeout()方法</p>
<button>点击这里,使三个矩形淡出</button>
<div id="div1" style="width: 100px; height: 100px; color: red;background-color: red; margin-top: 10px;"></div><div id="div2" style="width: 100px; height: 100px; color: #ffffff;background-color: #666666;margin-top: 10px;"></div><div id="div3" style="width: 100px; height: 100px; color: red;background-color: #555555;margin-top: 10px;"></div>
</body>
</html>