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

推荐订阅源

Recent Commits to openclaw:main
Recent Commits to openclaw:main
P
Palo Alto Networks Blog
C
Cybersecurity and Infrastructure Security Agency CISA
C
Cisco Blogs
Cyberwarzone
Cyberwarzone
S
Schneier on Security
T
Threatpost
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
Scott Helme
Scott Helme
T
Tor Project blog
P
Privacy & Cybersecurity Law Blog
V
Vulnerabilities – Threatpost
L
Lohrmann on Cybersecurity
T
The Exploit Database - CXSecurity.com
Know Your Adversary
Know Your Adversary
The Hacker News
The Hacker News
Security Latest
Security Latest
A
Arctic Wolf
P
Proofpoint News Feed
Google DeepMind News
Google DeepMind News
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
Vercel News
Vercel News
WordPress大学
WordPress大学
美团技术团队
C
Cyber Attacks, Cyber Crime and Cyber Security
罗磊的独立博客
Microsoft Security Blog
Microsoft Security Blog
量子位
H
Help Net Security
Webroot Blog
Webroot Blog
月光博客
月光博客
S
SegmentFault 最新的问题
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
Schneier on Security
Schneier on Security
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
IT之家
IT之家
H
Hacker News: Front Page
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
Jina AI
Jina AI
云风的 BLOG
云风的 BLOG
J
Java Code Geeks
www.infosecurity-magazine.com
www.infosecurity-magazine.com
Last Week in AI
Last Week in AI
C
CXSECURITY Database RSS Feed - CXSecurity.com
Spread Privacy
Spread Privacy
S
Security @ Cisco Blogs
博客园 - Franky
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
D
Darknet – Hacking Tools, Hacker News & Cyber Security

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