教程集 www.jiaochengji.com
教程集 >  jQuery  >  jquery 教程  >  正文 Jquery实现简单的动画效果代码

Jquery实现简单的动画效果代码

发布时间:2013-05-30   编辑:jiaochengji.com
Jquery实现简单的动画效果代码,需要的朋友可以参考下
jquery实现简单的动画效果代码,需要的朋友可以参考下
复制代码 代码如下:

<!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>
<title></title>
<script src="http://demo.jb51.net/jslib/jquery/jquery-1.7.1.js" type="text/javascript"></script>
<script type="text/javascript">
$(function () {
$("#panel").css("opacity", "0.1");//设置透明度
$("#panel").click(function () {
$(this).animate({ left: "400px", height: "200px", opacity: "1" }, 3000)//在3秒内向右移动400px,高度放大200px,透明度改为1
.animate({ top: "200px,width:200px" }, 3000)
.fadeOut("slow"); //以淡出的方式隐藏
});
})
</script>
</head>
<body>
<div id="panel" style=" position:relative; background-color:Olive; height:100px; width:100px; border:1px; border-color:Aqua;">
</div>
</body>
</html>

您可能感兴趣的文章:
CSS3使用Animate.css制作超炫的动画效果
Jquery实现简单的动画效果代码
jQuery 动画基础教程
jquery (show,fadeOut,Animate)简单效果
HTML5如何绘制动画?(代码实例)
jQuery实现动画效果的简单实例
利用JQuery动画制作滑动菜单项效果实现步骤及代码
使用jQuery实现的掷色子游戏动画效果
jquery必须知道的一些常用特效方法及使用示例(整理)
jquery中的animate函数

[关闭]
~ ~