惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Forbes - Security
Forbes - Security
C
CERT Recently Published Vulnerability Notes
NISL@THU
NISL@THU
I
Intezer
S
Schneier on Security
L
Lohrmann on Cybersecurity
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
月光博客
月光博客
G
Google Developers Blog
S
Securelist
WordPress大学
WordPress大学
T
Tailwind CSS Blog
IT之家
IT之家
C
Cybersecurity and Infrastructure Security Agency CISA
A
Arctic Wolf
C
CXSECURITY Database RSS Feed - CXSecurity.com
J
Java Code Geeks
宝玉的分享
宝玉的分享
阮一峰的网络日志
阮一峰的网络日志
V
Vulnerabilities – Threatpost
P
Privacy & Cybersecurity Law Blog
博客园 - 聂微东
D
Darknet – Hacking Tools, Hacker News & Cyber Security
The Cloudflare Blog
P
Privacy International News Feed
The Hacker News
The Hacker News
L
LINUX DO - 热门话题
爱范儿
爱范儿
Last Week in AI
Last Week in AI
博客园 - 【当耐特】
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
美团技术团队
有赞技术团队
有赞技术团队
博客园 - 司徒正美
C
Cyber Attacks, Cyber Crime and Cyber Security
大猫的无限游戏
大猫的无限游戏
Recent Commits to openclaw:main
Recent Commits to openclaw:main
G
GRAHAM CLULEY
小众软件
小众软件
T
Tenable Blog
Jina AI
Jina AI
Simon Willison's Weblog
Simon Willison's Weblog
Security Latest
Security Latest
Application and Cybersecurity Blog
Application and Cybersecurity Blog
AWS News Blog
AWS News Blog
T
Troy Hunt's Blog
博客园 - Franky
量子位
博客园_首页
P
Proofpoint News Feed

博客园 - everx

CruiseControl.net - 找到的一些文档。分享出来 【摘抄】回归测试(Regression Test) 那就来说说ASP.NET MVC中的Routing吧 ASP.NET MVC - View ASP.NET MVC - Controller(part Ⅱ) ASP.NET MVC - Controller(part Ⅰ) ASP.NET MVC - Model 学一下ASP.NET MVC C# 3.0的新特性 jQuery学习笔记(八) jQuery 学习笔记(七) SilverLight学习之路(四) Silverlight学习之路(三) - everx - 博客园 JQuery学习笔记(六) JQuery学习笔记(五) 初次使用log4net Silverlight学习之路(二) 播下silverlight的种子 JQuery学习笔记(三)
JQuery学习笔记(四)
everx · 2008-02-22 · via 博客园 - everx

五、动画效果

1、不使用动画效果显示和隐藏元素
主要是使用show()和hide()两个方法来实现
需要注意两点
a. JQuery主要是将display设置为none来隐藏元素的,即使包装集中的某一项已经是hide状态,它也会作为返回包装集中的内

容被返回
b. 如果显示设置了display为none,那在使用show方式时,回将display设置为block,反之,则会根据情况进行设置block或

inline

toggle()方法可以变换显示状态

2、使用动画效果显示和隐藏元素
hide(speed,callback)
speed    可以是毫秒或者预定义的slow, normal, fast
callback    当动画完成时调用的回调函数,没有参数,但是this代表运行动画的对象(元素)

show(speed,callback)
toggle(speed,callback)

3、其他的内置效果

fadeIn()     渐变进入
fadeOut()    渐变淡出
fadeOut(speed,callback)
fadeIn(speed,callback)
fadeTo(speed,opacity,callback)        opacity指定其透明度,值范围是0.0-1.0
slideDown(speed,callback)
slideUp(speed,callback)
slideToggle(speed,callback)
stop()

4、定制化自己的动画

animate(properties,duration,easing,callback)
animate(properties,options)

properties    JS对象类型,用于描述属性最后所要达到的值。除了设置数字值外,还可以设置字符值hide, show, or
toggle
duration    类似于之前的speed
easing   
callback    类似于之前的callback
options   

举个例子:
$('.animateMe').each(function(){
$(this).animate(
{
width: $(this).width() * 2,
height: $(this).height() * 2
},
2000
);
});