Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
CSS3/JS/Flash版动画角标的实现与比较
Search
kaiye
April 18, 2012
Technology
160
0
Share
CSS3/JS/Flash版动画角标的实现与比较
以动画角标的实现为例,探讨各种技术方案的优缺点。blog:
http://www.cnblogs.com/kaiye/archive/2012/04/06/3039043.html
kaiye
April 18, 2012
More Decks by kaiye
See All by kaiye
大话前端黑客
kaiye
4
330
前端七年之路
kaiye
8
430
拍拍首页2012版前端技术应用
kaiye
2
300
后IE6时代
kaiye
1
1.4k
GDD 2011 in Guangzhou
kaiye
0
1.8k
拍首2011前端技术分享
kaiye
1
200
Notification 3
kaiye
0
110
前端开发眼中的组件库
kaiye
3
500
Notification 2
kaiye
0
90
Other Decks in Technology
See All in Technology
TypeScriptはどのようにどこまで推論できるのか ─ とにかく as は禁止で
ypresto
0
250
そのSLO 99.9%、本当に必要ですか? 〜優先度付きSLOによる責任共有の設計思想〜 / Is that 99.9% SLO really necessary? Design philosophy of shared responsibility through prioritized SLOs
vtryo
0
870
ラズパイ & Picoで入門:Zephyr(RTOS)の環境構築からビルドまでの紹介
iotengineer22
0
130
AI飲み会幹事エージェントを作っただけなのに
ykimi
0
240
Pythonでベイズモデリング
soogie
0
150
可視化から活用へ — Mesh化・Segmentation・アライメントの研究動向
gpuunite_official
0
230
Swift Sequence の便利 API 再発見
treastrain
1
290
AIAgentと取り組むKaggle
508shuto
2
450
20260515 ログイン機能だけではないアカウント管理を全体で考える~サービス設計者向け~
oidfj
1
870
RedmineをAIで効率的に使う検証
yoshiokacb
0
160
"うちにはまだ早い"は本当? ─ 小さく始めるPlatform Engineering入門
harukasakihara
7
650
Directions Asia 2026 | Beyond Buildable AI Agents: Let’s Visualize Partner Value in the AI Era
ryoheig0405
0
130
Featured
See All Featured
The agentic SEO stack - context over prompts
schlessera
0
780
Future Trends and Review - Lecture 12 - Web Technologies (1019888BNR)
signer
PRO
0
3.5k
Testing 201, or: Great Expectations
jmmastey
46
8.1k
<Decoding/> the Language of Devs - We Love SEO 2024
nikkihalliwell
1
210
Highjacked: Video Game Concept Design
rkendrick25
PRO
1
360
Art, The Web, and Tiny UX
lynnandtonic
304
21k
The Art of Delivering Value - GDevCon NA Keynote
reverentgeek
16
2k
The Illustrated Guide to Node.js - THAT Conference 2024
reverentgeek
1
350
GitHub's CSS Performance
jonrohan
1033
470k
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
38
2.9k
Why Mistakes Are the Best Teachers: Turning Failure into a Pathway for Growth
auna
0
140
The World Runs on Bad Software
bkeepers
PRO
72
12k
Transcript
CSS3/JS/Flash版 动画角标的实现与比较 @kaiye
• 2008 - 2010 前端开发@支付宝 • 2010 - 至今 网页重构@ISUX
CSS3 Properties
CSS3 Animation http://css-tricks.com/examples/CSS3Clock/
CSS3 Animation http://designlovr.com/examples/ dynamic_stack_of_index_cards/
CSS3 Animation • http://www.paipai.com/caizuanjie.shtml • http://www.paipai.com/fangjia.shtml • chrome://flags/ enable Composited
render layer borders (合成渲染层边框)
CSS3动画角标 <css-selector>{ animation:<animation-name> <animation-duration> <animation-timing-function>; } @keyframes <animation-name>{ 0% {<css-declaration>}
100% {<css-declaration>} }
CSS3动画角标 .corner-ad-1:hover{animation: cornerad 0.3s step-start;} @keyframes cornerad{ 0% {background-position: right
0;} 33%{background-position: right -36px;} 67%{background-position: right -72px;} 100% {background-position: right -108px;} } http://yekai.net/demo/animation-corner-2.html
JS动画角标 http://yekai.net/demo/animation-corner-3.html
Flash动画角标 • Flash的参数设置 • getURL() http://yekai.net/demo/animation-corner-4.html
Flash动画角标 • Flash的参数设置 <embed src="corner.swf" pluginspage="http://www.macromedia.com/go/ getflashplayer" type="application/x-shockwave-flash" wmode="transparent" allowscriptaccess="always"
quality="high" width="120" height="120" FlashVars="url=http://t.qq.com/ weiweixiao&pic=http://t0.qlogo.cn/mbloghead/ ce1dbda08969ddd2a5ea/ 120&callback=closeCornerAd" ></embed> 若变量值含有&符号,需转义为%26
Flash动画角标 • getURL()
动画角标方案比较 方案 实现成本 复用成本 兼容性 CSS 低 低 IE6/7 CSS3
中 中 Safari/Chrome/ Firefox/IE10 JS 高 低 !noscript Flash 高 低 Flash Player/!iOS
None
while(兼容性 && 实现成本){ do(); }
while(兼容性 && 实现成本){ do(); } var 兼容性 = this.兼容性 ;
IE && !IE • HTML5/CSS3 • http://sofish.de/1819 • http://pb.paipaioa.com •
IE • CSS Attributes • Introduction to Dynamic HTML • ActiveX
Reference • http://findmebyip.com/litmus/ • http://www.qianduan.net/47-amazing-css3- animation.html • http://www.5uflash.com/flashjiaocheng/ Flashyuweb/3173.html
谢谢