jquery动画,animate({height:'toggle'}); 这个速度太快了,想让它慢一点,怎么写
<!DOCTYPEhtmlPUBLIC"-//W3C//DTDXHTML1.0Transitional//EN""http://www.w3.org/TR/xhtml1/...
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>动画</title>
<script src="http://libs.baidu.com/jquery/1.9.0/jquery.js"></script>
<style>
body{font-family:"微软雅黑";font-weight:bold;}
a {
color: #FFFFFF;
text-decoration: none;
}
ul,li{margin:0px;padding:0px;list-style:none;}
.ad {
margin-top: 15px;
margin-right: auto;
margin-bottom: 15px;
margin-left: auto;
width: 960px;
text-align: left;
}
.btn {
color: #0033FF;
height: 32px;
width: 88px;
border: 1px dashed #ddd;
font-family: "微软雅黑";
font-size: 16px;
line-height: 32px;
font-weight: bold;
text-align: center;
position: fixed;
top:58px;
right:14px;
}
.btn:hover {
color: #FFFFFF;
background-color: #0066FF;
cursor:pointer;
}
</style>
</head>
<body>
<div class="ad"><a href="#"><img src="sss.jpg" border="0" /></a></div>
<div class="btn">按钮</div>
<script>
$(function(){
$('.btn').click(function(){
$('.ad').animate({height:'toggle'});
});
});
</script>
</body>
</html> 展开
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>动画</title>
<script src="http://libs.baidu.com/jquery/1.9.0/jquery.js"></script>
<style>
body{font-family:"微软雅黑";font-weight:bold;}
a {
color: #FFFFFF;
text-decoration: none;
}
ul,li{margin:0px;padding:0px;list-style:none;}
.ad {
margin-top: 15px;
margin-right: auto;
margin-bottom: 15px;
margin-left: auto;
width: 960px;
text-align: left;
}
.btn {
color: #0033FF;
height: 32px;
width: 88px;
border: 1px dashed #ddd;
font-family: "微软雅黑";
font-size: 16px;
line-height: 32px;
font-weight: bold;
text-align: center;
position: fixed;
top:58px;
right:14px;
}
.btn:hover {
color: #FFFFFF;
background-color: #0066FF;
cursor:pointer;
}
</style>
</head>
<body>
<div class="ad"><a href="#"><img src="sss.jpg" border="0" /></a></div>
<div class="btn">按钮</div>
<script>
$(function(){
$('.btn').click(function(){
$('.ad').animate({height:'toggle'});
});
});
</script>
</body>
</html> 展开
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询