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

推荐订阅源

Know Your Adversary
Know Your Adversary
GbyAI
GbyAI
T
The Blog of Author Tim Ferriss
B
Blog RSS Feed
大猫的无限游戏
大猫的无限游戏
Engineering at Meta
Engineering at Meta
Microsoft Security Blog
Microsoft Security Blog
P
Proofpoint News Feed
罗磊的独立博客
博客园 - 【当耐特】
G
Google Developers Blog
有赞技术团队
有赞技术团队
The Register - Security
The Register - Security
T
Tailwind CSS Blog
Blog — PlanetScale
Blog — PlanetScale
L
LangChain Blog
美团技术团队
The GitHub Blog
The GitHub Blog
阮一峰的网络日志
阮一峰的网络日志
博客园 - 三生石上(FineUI控件)
S
SegmentFault 最新的问题
博客园 - Franky
A
About on SuperTechFans
Vercel News
Vercel News
F
Full Disclosure
Recent Announcements
Recent Announcements
博客园 - 叶小钗
Hacker News - Newest:
Hacker News - Newest: "LLM"
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
S
Schneier on Security
Hugging Face - Blog
Hugging Face - Blog
T
The Exploit Database - CXSecurity.com
I
Intezer
月光博客
月光博客
Y
Y Combinator Blog
C
Cyber Attacks, Cyber Crime and Cyber Security
C
CERT Recently Published Vulnerability Notes
S
Securelist
WordPress大学
WordPress大学
小众软件
小众软件
T
Tenable Blog
D
Docker
AWS News Blog
AWS News Blog
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
Simon Willison's Weblog
Simon Willison's Weblog
博客园 - 司徒正美
C
CXSECURITY Database RSS Feed - CXSecurity.com
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
酷 壳 – CoolShell
酷 壳 – CoolShell
F
Fortinet All Blogs

博客园 - 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
);
});