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

推荐订阅源

T
Threat Research - Cisco Blogs
C
Cybersecurity and Infrastructure Security Agency CISA
T
Tenable Blog
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
C
Cisco Blogs
I
Intezer
Hacker News - Newest:
Hacker News - Newest: "LLM"
Hacker News: Ask HN
Hacker News: Ask HN
Schneier on Security
Schneier on Security
H
Heimdal Security Blog
Simon Willison's Weblog
Simon Willison's Weblog
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
Cyberwarzone
Cyberwarzone
V2EX - 技术
V2EX - 技术
W
WeLiveSecurity
Help Net Security
Help Net Security
S
Secure Thoughts
P
Privacy & Cybersecurity Law Blog
S
Securelist
SecWiki News
SecWiki News
P
Palo Alto Networks Blog
C
CERT Recently Published Vulnerability Notes
Know Your Adversary
Know Your Adversary
The Last Watchdog
The Last Watchdog
N
News | PayPal Newsroom
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
V
Vulnerabilities – Threatpost
H
Hacker News: Front Page
NISL@THU
NISL@THU
Scott Helme
Scott Helme
L
LINUX DO - 热门话题
Attack and Defense Labs
Attack and Defense Labs
Security Archives - TechRepublic
Security Archives - TechRepublic
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
Google Online Security Blog
Google Online Security Blog
The Hacker News
The Hacker News
Cloudbric
Cloudbric
G
Google Developers Blog
Google DeepMind News
Google DeepMind News
N
News and Events Feed by Topic
A
Arctic Wolf
Latest news
Latest news
S
Schneier on Security
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
V
Visual Studio Blog
Project Zero
Project Zero
P
Privacy International News Feed
B
Blog
云风的 BLOG
云风的 BLOG

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