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
Animationszauber - Geringer Aufwand, Maximale W...
Search
Martin W. Kirst
March 01, 2014
Programming
0
11
Animationszauber - Geringer Aufwand, Maximale Wirkung
Einfache Animationen via CSS, JS, jQuery
Martin W. Kirst
March 01, 2014
Tweet
Share
More Decks by Martin W. Kirst
See All by Martin W. Kirst
Typescript, an introduction
nitram509
0
14
Doing effective and fun retrospectives
nitram509
0
84
Reactive Programming - Einführung
nitram509
0
14
Domänen-Objekte sortieren mit Vector Space Classification
nitram509
0
25
Sorting Domain Objects via Vector Space Classification
nitram509
0
15
Other Decks in Programming
See All in Programming
プロポーザル駆動学習 / Proposal-Driven Learning
mackey0225
2
1.4k
AIを活用し、今後に備えるための技術知識 / Basic Knowledge to Utilize AI
kishida
22
5.9k
MCPでVibe Working。そして、結局はContext Eng(略)/ Working with Vibe on MCP And Context Eng
rkaga
5
2.3k
知っているようで知らない"rails new"の世界 / The World of "rails new" You Think You Know but Don't
luccafort
PRO
1
330
ファインディ株式会社におけるMCP活用とサービス開発
starfish719
0
2.2k
スケールする組織の実現に向けた インナーソース育成術 - ISGT2025
teamlab
PRO
2
180
プロパティベーステストによるUIテスト: LLMによるプロパティ定義生成でエッジケースを捉える
tetta_pdnt
0
6.4k
AIを活用したレシート読み取り機能の開発から得られた実践知 / AI Receipt Scan Practice
rockname
0
140
JSONataを使ってみよう Step Functionsが楽しくなる実践テクニック #devio2025
dafujii
1
650
Platformに“ちょうどいい”責務ってどこ? 関心の熱さにあわせて考える、責務分担のプラクティス
estie
1
270
The Past, Present, and Future of Enterprise Java with ASF in the Middle
ivargrimstad
0
210
Reading Rails 1.0 Source Code
okuramasafumi
0
260
Featured
See All Featured
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
PRO
188
55k
Imperfection Machines: The Place of Print at Facebook
scottboms
268
13k
Building a Scalable Design System with Sketch
lauravandoore
462
33k
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
333
22k
Raft: Consensus for Rubyists
vanstee
140
7.1k
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
9
820
Bash Introduction
62gerente
615
210k
Fantastic passwords and where to find them - at NoRuKo
philnash
52
3.4k
Done Done
chrislema
185
16k
A better future with KSS
kneath
239
17k
Unsuck your backbone
ammeep
671
58k
Designing for humans not robots
tammielis
253
25k
Transcript
ANIMATIONSZAUBER GERINGER AUFWAND, MAXIMALE WIRKUNG © 03/2014 Martin W. Kirst
/ @nitram509
Twitter ⋅ Github ⋅ SourceForge UX-Experte Von ASM bis Zope
1k Demos (378 Byte) ♥ HTML + CSS + JS ♥
Wirkung Grundlagen Animation Prinzipien CSS Animationen Javascript Animationen Tweens /
Tweening AGENDA
Konsistenz > Vielfalt PRINZIP
Position Rotation Skalierung Transformation WAS?
Laufzeit (duration) Verzögerung (delay) Veränderungskurve (easing) WIE?
Hands on… EASING
EASING « Weitere ... http://easings.net »
CSS ANIMATION - EINFACH #rocket { transition: bottom 4s ease-out,
left 4s ease-out; } #rocket.start { bottom: 11px; left: -13px; } #rocket.end { bottom: 300px; left: 385px; }
CSS ANIMATION - KOMPLEX @keyframes up-and-down { 1% {bottom: 11px;
} 50% {bottom: 145px;} 100% {bottom: 11px; } } #rocket { transition: left 4s, ease-out; } #rocket.start { /* ... */ } #rocket.end { animation: up-and-down 4s; left: 385px; }
CSS MENÜS
CSS BILDER .box { transition: all 500ms cubic-bezier(0.190, 1.000, 0.220,
1.000); box-shadow: 0 1px 1px rgba(0,0,0,0.3); transform: translateY(0) scale(0.95, 0.95); } .box.active { box-shadow: 0 11px 18px rgba(0,0,0,0.2); transform: translateY(-20px) scale(1, 1); } http://aerotwist.com/tutorials/protip-nobody-expects-3d/
CSS3 ADVANCED++ http://anthonycalzadilla.com/css3-ATAT/ ⋅ http://codepen.io/Sonick/pen/vijJl ⋅ http://tympanus.net/Tutorials/CreativeCSS3AnimationMenus/
NACHTEILE CSS-ANIMATION Nur DOM Keine Interaktion Keine Callbacks wenn fertig
Prozentuale Zeitangaben (keyframes)
JS - JQUERY BASICS show / hide fadeIn / fadeOut
slideUp / slideDown animate (custom properties)
JS FADING & SLIDING ToDo List Beispiel
CSS BILDER var logo = $('#bedcon-logo'); logo.animate({color: 255}, { duration:
4000, easing: 'swing', step: function (now, tween) { var color = 255 - (now | 0); this.style.backgroundColor = 'rgb('+color+','+color+','+color+')' }, complete: function() { // 2 Sekunden setTimeout() logo[0].style.backgroundColor = '#fff' } });
TWEENING Schlüsselbildanimation Bewegung zwischen Keyframes Unabhängig von UI-Technologie
CSS BILDER img = document.getElementById("bedcon-tween"); tween1 = new TWEEN.Tween( {
x: 10 } ) .to( { x: 190 }, 3000 ) .onUpdate( function () { img.style.left = this.x + 'px'; }); tween1r = new TWEEN.Tween( { r : 0} ) .to( { r: 360 }, 3000) .onUpdate(function () { img.style.transform="rotate("+this.r+"deg)";}); tween2 = new TWEEN.Tween( { y: 270 } ) .to( { y: 10 } ) .easing(TWEEN.Easing.Elastic.InOut) .onUpdate( function () { img.style.bottom = this.y + 'px'; }); tween1.chain(tween2); tween1.start(); tween1r.start();
FAZIT JS + CSS >> JS xor CSS Konsistenz >>
Vielfalt Einfach => Frameworks Komplex => ...
ANIMATION FUN
DANKE ⋅ THANKS ⋅ MERCI ©2014 Martin W. Kirst Twitter:
@nitram509 ⋅ Github: nitram509 ⋅
[email protected]
http://www.aerotwist.com/lab/ http://johnpolacek.github.io/superscrollorama/ https://medium.com/design-ux/8068a5e4cb82 http://hakim.se/ http://easings.net http://codepen.io/Sonick/pen/vijJl http://anthonycalzadilla.com/css3-ATAT/ http://tympanus.net/Tutorials/CreativeCSS3AnimationMenus/ https://github.com/sole/tween.js/ https://github.com/hakimel/reveal.js http://js1k.com/