<html>
<head>
<title>jquery的动画效果</title>
<meta charset="UTF-8"/>
<!--引入jquery文件-->
<script src="js/jquery-1.9.1.js" type="text/javascript" charset="utf-8"></script>
<script type="text/javascript">
//动画效果
function operDiv(){
//获取div
var div=$("div");
div.show(3000);
div.hide(3000);
div.toggle(3000);
$("#div01").slideDown(2000);
$("#div01").slideUp(2000);
$("div").slideToggle(2000);
$("#div02").fadeIn(8000);
$("#div01").fadeOut(4000);
}
</script>
<!--声明css代码域-->
<style type="text/css">
#div01{
height: 300px;
background-color: orange;
display: none;
}
#div02{
height: 300px;
background-color: #9932CC;
}
</style>
</head>
<body onload="operDiv()">
<div id="div01">
</div>
<div id="div02">
</div>
</body>
</html>