jQuery 开始动画,停止动画
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>效果2</title>
<script src="js/jquery-1.7.1.min.js"></script>
</head>
<style>
.fff{
background: #fff;
border: 1px solid #000;
}
.head{line-height: 30px;background: #999;}
.arrow{width: 20px;height: 20px;background: red;display: block;float: right;}
.div1{
width: 100%;
height: 50px;
background: red;
}
.ani-1{
width: 50px;
height: 50px;
background: red;
}
</style>
<script>
$(document).ready(function(){
$(".arrow").click(function(){
$("#div1").slideToggle();
});
$("#go").click(function(){
$("#anA").animate({
width:"400px",
height:"400px",
fontSize:"18px",
marginLeft:"30px"
},5000)
})
$("#sttop").click(function(){
$("#anA").stop()
})
jQuery.fx.interval = 100;
$("input").click(function(){
$("div").toggle( 3000 );
});
});
</script>
<body>
<div class="head">我是大标题 <a class="arrow" onclick="btn_click()"></a></div>
<div id="div1" class="div1"></div>
<button id="go">开始动画</button> <button id="sttop">停止动画</button>
<div class="ani-1" id="anA">哈哈哈,你来打我啊</div>
<p><input type="button" value="Run"/></p>
<div></div>
</body>
</html>

记录平时的一些小问题~
或转载一些小知识点
学习学习

浙公网安备 33010602011771号