返回自定义动画实现...登陆

自定义动画实现

其实没有什么2018-11-16 20:20:50231
<!DOCTYPE html>
<html>
<head>
<title></title>
<script type="text/javascript" src="http://code.jquery.com/jquery-2.2.4.min.js"></script>
<style type="text/css">
#d1 {
display: none;
width: 100px;
height: 100px;
background: green;
}
#d2 {
display: block;
width: 100px;
height: 100px;
background: green;
}
#d3 {
display: block;
width: 100px;
height: 100px;
background: green;
}
</style>
</head>
<body>
<button class="d1">click</button>
<div id="d1"></div>

<script type="text/javascript" src="http://code.jquery.com/jquery-2.2.4.min.js"></script>
<script type="text/javascript">
// 显示/隐藏
$('.d1').click(function(){
// 显示
$('#d1').animate({
height: "300px",
width: "800px",
left: "200px",
top: "200px"
}, 1000, function(){
alert('ok');
});
})
</script>
</body>
</html>

嗯!这个在实际开发中经常用吗?

最新手记推荐

• 用composer安装thinkphp框架的步骤• 省市区接口说明• 用thinkphp,后台新增栏目• 管理员添加编辑删除• 管理员添加编辑删除

全部回复(0)我要回复

暂无评论~
  • 取消回复发送