jQuery中animate()函数的用法
来源:互联网 发布:拆卸软件是什么意思 编辑:程序博客网 时间:2024/06/05 03:35
jQuery中函数animate()作用是对被选元素执行之定义动画。
语法:
$(selector).animate({params},[duration],[easing],[callback]);
参数说明:
params:定义产生动画的CSS属性,可以定义多个params属性。
duration:定义用来应用的动画的时间。
easing:要使用的擦除效果的名称(需要插件支持).默认jQuery提供"linear" 和 "swing".
示例:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"><HTML> <HEAD> <TITLE> New Document </TITLE> <META NAME="Generator" CONTENT="EditPlus"> <META NAME="Author" CONTENT=""> <META NAME="Keywords" CONTENT=""> <META NAME="Description" CONTENT=""> <script type="text/javascript" src="jquery-1.6.4.js"></script> <script type="text/javascript">$(document).ready(function(){$('#start').click(function(){$("#box").animate({left:"100px"},"slow");$("#box").animate({fontSize:"3em"},"slow");$("#box").animate({fontSize:"1em"},"slow");$("#box").animate({left:"0px"},"slow");});}); </script> </HEAD> <BODY> <p><a href="#" id="start">Start Animation</a></p> <div id="box" style="background:#98bf21;height:100px;width:200px;position:relative">Hello</div> </BODY></HTML>
- jQuery中animate()函数的用法
- jquery的animate函数详解
- JQuery的animate中callback函数的使用
- jQuery的animate中callback函数会立即执行
- jquery中animate()函数不能调用元素的display属性
- jquery中的animate函数在ie中失效的原因
- zepto中animate的用法
- jquery-animate基本用法
- jquery.animate自定义动画的函数
- 了解jQuery的animate()函数
- jQuery.animate() 函数详解
- jQuery animate函数
- jquery中animate动画的小例子
- JQuery中animate的一些坑
- 原生js封装好的动画函数+jQuery函数animate
- JQuery的animate
- jquery animate stop函数解析
- JQUERY ANIMATE动画函数简介
- 重装VS 2008出现的加载安装组件出错的终极解决方案
- 目录结构及其概述
- 弹出 多个 修改背景的 AlertView
- 究竟啥是上下文(Context) 本人理解
- 在Myeclipse8.5如何安装Jython
- jQuery中animate()函数的用法
- freemarker调用静态方法
- 不借助任何第三方软件,使用笔记本(win7)当路由器供其他无线终端上网
- android Cursor
- POP3邮局协议的一些命令
- Android开发之路之二------第一个程序HelloWord
- C# 导出CSV 功能
- struts2 spring集成时struts.xml文件中action的class属性值意义
- linux命令的使用