SlideShare uma empresa Scribd logo
1 de 82
Baixar para ler offline
1
CREATING BEAUTIFUL
CSS ANIMATIONS
@RAMISAYAR
FITC Amsterdam 2016
2 . 1
AGENDA
History of Animation on the Web
Introducing CSS3 Animations
Browser Compatibility
CSS3 Animation Libraries
Principles for Beautiful Animations
2 . 2
ASSUMPTIONS
You know what the web is…
Working knowledge of HTML5 & CSS3.
Slides will be made available on SlideShare.net/RamiSayar
2 . 32 . 43 . 1
3 . 2
CAMERON'S WORLD
4 . 1
AND THEN THERE WAS
FLASH
4 . 2
IT WAS A VERY DARK TIME FOR THE
WEB. I CAN’T BELIEVE THIS STILL
...EXISTS
4 . 3
CLASSIC FLASH
ANIMATIONS
4 . 4
Hop It - Simon's Cat
4 . 5
Animator vs. Animation (original)
4 . 6
Animator vs. Animation II (original)
4 . 7
THINGS DIDN'T END
WELL...
4 . 8
APRIL 2010, STEVE JOBS WRITES
“THOUGHTS ON FLASH”
4 . 94 . 10
RIP FLASH. 2015
4 . 11
BUT ONE MORE FOR OLD TIMES SAKE
Sketchy Ice Creams from Birdbox Studio
5 . 1
WHILE FLASH EXISTED, WE HAD
JAVASCRIPT & DHTML
5 . 2
DHTML IS THE COMBINATION OF HTML,
CSS AND JAVASCRIPT.
Animate text and images in their document, independently
moving each element from any starting point to any ending
point, following a predetermined path or one chosen by the
user.
Embed a ticker that automatically refreshes its content with
the latest news, stock quotes, or other data.
Use a form to capture user input, and then process, verify and
respond to that data without having to send data back to the
server.
Include rollover buttons or drop-down menus.
5 . 3
DRUNK HARLEQUIN TEXT
5 . 4
DHTML CODE SAMPLE
function splat(text){ // randomize text color, size, and weight
text=text.substring(0,text.length);
var fs=.5
for(i=0;text.length > i;i++){
f=Math.random();
if (Math.abs(f-fs) < .11) {f=Math.random()};
if (Math.abs(f-fs) < .11) {f=Math.random()};
if (f<.1) {c='00ffff'};
if (f>=.1 && f<.2) {c='7cfc00'};
if (f>=.2 && f<.3) {c='6495ed'};
if (f>=.3 && f<.4) {c='ffd700'};
if (f>=.4 && f<.5) {c='ff7f50'};
if (f>=.5 && f<.6) {c='ff00ff'};
if (f>=.6 && f<.7) {c='ccff00'};
if (f>=.7 && f<.8) {c='ff6964'};
if (f>=.8 && f<.9) {c='ff4500'};
if (f>=.9) {c='dc143c'};
6
JAVASCRIPT AND HTML5 CANVAS
EXAMPLES:
Tearable Cloth
Free Rider HD
Canvas is great for big, complex animations but it absolutely
kills accessibility on your website. Not to mention that the
JavaScript code quickly becomes complicated.
7
HISTORY OF ANIMATIONS ON THE WEB
1987 – Initial release of Graphics Interchange Format
1996 – Initial release of Adobe Flash Player
1997 – Netscape releases the “layers” feature in Netscape 4.
Layers was a precursor to div. Subsequently, dropped for
divs.
JavaScript animations popular, part of a set of techniques
called Dynamic HTML. Standards movement contributed to
death of DHTML.
2004 – HTML5 Canvas Introduced by Apple in WebKit.
2008 – Initial release of Animated Portable Network Graphics
(apng)
2009 – Initial Draft of CSS Animations (CSS3 Module)
2012-2016 – Resurgence of GIF in popularity???
89 . 1
INTRODUCING CSS3
ANIMATIONS
9 . 2
INTRODUCING CSS3 ANIMATIONS
CSS3 Animations can be performed with 3 different
techniques:
Transitions
Transforms
Animations (Narrow Definition)
10 . 1
CSS3 TRANSITIONS
10 . 2
CSS3 TRANSITIONS
transition: [ <transition-property> || <transition-duration>
|| <transition-timing-function> || <transition-delay> ]
transition-property includes color, width, height, background-
color, padding, margin, top, right, bottom, left, font-size, font-
weight, etc.
See W3C Spec.
10 . 3
CSS3 TRANSITIONS
transition: [ <transition-property> || <transition-duration>
|| <transition-timing-function> || <transition-delay> ]
transition-duration is how long the animation takes in seconds.
transition-delay is how long the animation waits before
changing the transition-property.
10 . 4
CSS3 TRANSITIONS
transition: [ <transition-property> || <transition-duration>
|| <transition-timing-function> || <transition-delay> ]
transition-timing-function determines how intermediate values
of the transition are calculated. Only two classes of timing
functions: cubic-bezier() and steps() functions.
10 . 5
CSS3 TRANSITIONS – TIMING
FUNCTIONS
Reference MDN
10 . 6
CSS3 TRANSITIONS – CUBIC-BEZIER()
cubic-bezier() defines a cubic Bézier curve
Curves are continuous, sometimes called easing functions.
Reference MDN
10 . 7
CSS3 TRANSITIONS – CUBIC-BEZIER()
Defined by four points P0, P1, P2, and P3. P0 and P3 are the
start and the end of the curve.
In CSS3, P0 is always set to (0, 0) and represents the initial
time and the initial state, P3 is (1, 1) and represents the final
time and the final state.
Reference MDN
CSS3 TRANSITIONS – CUBIC-BEZIER()
10 . 8
Reference MDN
10 . 9
CSS3 TRANSITIONS – CUBIC-BEZIER()
Invalid curves are possible and cause the entire property to be
ignored.
P1 or P2 ordinate outside the [0, 1] range may
generate bouncing effects.
cubic-bezier(x1, y1, x2, y2);
10 . 10
CSS3 TRANSITIONS – CUBIC-BEZIER()
Common cubic bezier are named in CSS3.
Cheat Sheet easings.net
10 . 11
CSS3 TRANSITIONS – STEPS()
steps(number_of_steps, direction) defines a step function
with the direction indicating if it’s left/right-continuous.
Direction is specified with start||end.
Reference MDN
CSS3 TRANSITIONS – STEPS()
steps(2, start);
10 . 12
Reference MDN
11 . 1
CSS3 TRANSFORMS
2D TRANSFORMS:
transform: skew(x, y | <angle>)
|| scale(x, y | <length> or <percentage>) || rotate(angle | <angle>)
|| translate(x, y | <length> or <percentage>)
11 . 2
CSS3 2D TRANSFORMS CODE SAMPLE
#twodtrans-1{
transform: skew(10deg, 10deg);
}
#twodtrans-2{
transform: scale(2, 1);
}
#twodtrans-3{
transform: rotate(60deg);
}
#twodtrans-4{
transform: translate(-10px, 50px);
}
11 . 3
CSS3 TRANSFORMS
3D TRANSFORMS:
transform: translate3d(x, y, z | <length> or <percentage>)
/* Except z=<length> */
|| scale3d(x, y, z | <number>)
|| rotateX(<angle>)
|| rotateY(<angle>)
|| rotateZ(<angle>)
Perspective and perspective-origin set user’s perspective and
vanishing point.
There are other properties like: transform-box, transform-origin,
transform-style, backface-visibility.
11 . 4
CSS3 3D TRANSFORMS CODE SAMPLE
#threedtrans-1{
transform: rotateX(180deg);
}
#threedtrans-2{
transform: rotateY(180deg);
}
#threedtrans-3{
transform: rotateZ(180deg);
}
/* perspective: 800px; perspective-origin: 50% 100px; */
12 . 1
CSS3 ANIMATIONS - @KEYFRAMES
@keyframes define what an animation looks like at each
stage.
@keyframes are composed of three parts:
name - name of the animation
stage – a percentage used to define the properties at that
stage. 0% (also can use from) and 100% (also can use to)
have to be defined.
properties – CSS properties
12 . 2
CSS3 ANIMATIONS - @KEYFRAMES
@keyframes name {
0% {/*can use from */
top: 0;
}
50% {
top: 30px;
}
100% {/* can use to*/
top: 0;
}
}
13 . 1
CSS3 ANIMATIONS - ANIMATION
13 . 2
CSS3 ANIMATIONS - ANIMATION
Animation does two things:
Assign the @keyframes to the elements.
Define how it is animated.
#div {
animation-name: keyframe-name;
animation-duration: 1s;
animation-timing-function: ease;
}
13 . 3
CSS3 ANIMATIONS - ANIMATION
PROPERTIES
Animation Properties:
animation-name: name (Default: none)
animation-duration: time of animation in seconds (Default:
0s)
animation-timing-function: timing function, remember
cubic bezier curves (Default: ease)
animation-delay: delay to start of animation (Default: 0s)
13 . 4
CSS3 ANIMATIONS - ANIMATION
PROPERTIES
Animation Properties:
animation-iteration-count: times to run the animation
(Default: 1)
animation-direction: direction to play the animation,
normal || reverse || alternate || alternate-reverse (Default:
normal)
animation-fill-mode: how should CSS apply styles, none ||
forwards || backwards || both (Default: none)
animation-play-state: animation running || paused (Default:
running)
13 . 5
CSS3 ANIMATIONS - ANIMATION
PROPERTIES
Animation Shorthand Syntax:
animation: [animation-name]
[animation-duration]
[animation-timing-function]
[animation-delay]
[animation-iteration-count];
13 . 6
CSS3 ANIMATION CODE SAMPLE
@keyframes fadeOut {
0% {opacity: 1;}
100% {opacity: 0;}
}
@keyframes pulse {
0% { transform: scale(1); }
50% { transform: scale(1.2); }
100% { transform: scale(1); }
}
#css3animation{
animation-name: pulse, fadeOut;
animation-duration: 1s, 5s;
animation-delay: 0s, 5s;
animation-iteration-count: infinite, infinite;
animation-play-state: paused;
}
13 . 7
BEAUTIFUL CSS ANIMATION EXAMPLES
CSS 3D Solar System
Pure CSS3 AT-AT Walker
Stretchy Cat
1415 . 1
BROWSER
COMPATIBILITY
15 . 2
15 . 3
15 . 4
15 . 5
15 . 6
HANDLING BROWSER PREFIXES
SANELY – AUTOPREFIXER
plugin to parse CSS and add vendor prefixes to CSS
rules using values from .
Can add to Grunt and Gulp.
PostCSS
Can I Use
@keyframes name {
0% {
top: 0;
}
50% {
top: 30px;
}
100% {
top: 0;
}
}
15 . 7
15 . 8
BECOMES
@-webkit-keyframes name {
0% {
top: 0;
}
50% {
top: 30px;
}
100% {
top: 0; }
}
@keyframes name {
0% {
top: 0;
}
50% {
top: 30px;
}
15 . 9
15 . 10
HANDLING BROWSER PREFIXES
SANELY – BOURBON.IO
Simple mixins library for Sass. Using @include to output
prefixes.
box:hover {
@include animation(scale 1.0s ease-in, slide 2.0s ease);
}
16 . 1
CSS3 ANIMATION LIBRARIES
animate.css is a bunch of cool, fun, and cross-browser
animations for you to use in your projects. Great for emphasis,
home pages, sliders, and general just-add-water-awesomeness.
Demo
Magic.css is a bunch of CSS3 Animations with special effects.
Demo
16 . 2
THE GEOCITIES-IZER
17 . 1
PRINCIPLES FOR
BEAUTIFUL ANIMATIONS
17 . 2
DISNEY ANIMATION: THE ILLUSION OF LIFE
Book by Ollie Johnston and Frank Thomas, two of the animation
masters at Disney's during the Golden Age of animation, referred
by Walt Disney as his "Nine Old Men".
17 . 3
PRINCIPLE 1: SQUASH
AND STRETCH
Give a sense of weight and flexibility to drawn objects.
17 . 4
PRINCIPLE 2:
ANTICIPATION
Prepare the audience for an action, and to make the action
appear more realistic. Ex. A dancer jumping off the floor has to
bend his knees first.
17 . 5
PRINCIPLE 3: STAGING
Direct the audience's attention and make it clear what is
important.
17 . 6
PRINCIPLE 4: STRAIGHT
AHEAD ACTION AND
POSE TO POSE
"Straight ahead action" means drawing out a scene frame by
frame from beginning to end, while "pose to pose" involves
starting with drawing a few key frames, and then filling in the
intervals later.
17 . 7
PRINCIPLE 5: FOLLOW
THROUGH AND
OVERLAPPING ACTION
Give the impression that characters follow the laws of physics,
including the principle of inertia.
17 . 8
PRINCIPLE 6: SLOW IN
AND SLOW OUT
Accelerate and Decelerate.
17 . 9
PRINCIPLE 7: FOLLOW
ARCS
17 . 10
PRINCIPLE 8:
SECONDARY ACTION
17 . 11
PRINCIPLE 9: TIMING
(AKA FRAMES/SECOND)
17 . 12
PRINCIPLE 10:
EXAGGERATION
17 . 13
PRINCIPLE 11: SOLID
DRAWING
17 . 14
PRINCIPLE 12: APPEAL
AKA CHARISMA
17 . 15
PURE CSS FAIL WHALE
18 . 1
WHAT DID WE LEARN?
History of Animation on the Web
CSS3 Animations
Transitions
Transforms
@keyframes & Animations
Browser Compatibility
Autoprefixer
Bourbon.io
CSS3 Animation Libraries
Animate.css
18 . 2
THANK YOU!
QUESTIONS?
ALSO, I WOULD LOVE TO SPEAK MORE
IN EUROPE ;)
TW: | GH:@RAMISAYAR @SAYAR
SLIDESHARE.NET/RAMISAYAR
18 . 3
RESOURCES, REFERENCES, LINKS
http://dailyjs.com/2010/06/27/167-history-of-javascript/
http://www.nytimes.com/2013/02/14/fashion/common-on-early-i
files-make-comeback.html?_r=1&
https://hg.csswg.org/drafts/log/2579c1842a7c/css3-
animations/Overview.src.html
http://www.peterbe.com/plog/worst-flash-site-of-the-year-2010
https://www.kirupa.com/html5/creating_simple_html5_canvas_a
http://stackoverflow.com/questions/11182478/performance-css3
vs-html5-canvas
18 . 4
RESOURCES, REFERENCES, LINKS
http://css3.bradshawenterprises.com/transitions/#delays
https://developer.mozilla.org/en-
US/docs/Web/CSS/CSS_Transitions/Using_CSS_transitions
https://developer.mozilla.org/en-US/docs/Web/CSS/timing-
function
https://robots.thoughtbot.com/css-animation-for-beginners
https://www.smashingmagazine.com/2011/09/the-guide-to-
css-animation-principles-and-examples/
https://ihatetomatoes.net/the-guide-to-css-animations-for-
the-web/
http://www.creativebloq.com/css3/animation-with-css3-
712437

Mais conteúdo relacionado

Mais procurados

Designing with malli
Designing with malliDesigning with malli
Designing with malliMetosin Oy
 
Malli: inside data-driven schemas
Malli: inside data-driven schemasMalli: inside data-driven schemas
Malli: inside data-driven schemasMetosin Oy
 
Naked Performance With Clojure
Naked Performance With ClojureNaked Performance With Clojure
Naked Performance With ClojureMetosin Oy
 
Exploring Canvas
Exploring CanvasExploring Canvas
Exploring CanvasKevin Hoyt
 
Vector Tile Caching: ArcStache
Vector Tile Caching: ArcStacheVector Tile Caching: ArcStache
Vector Tile Caching: ArcStacheDave Bouwman
 
Clojutre Real Life (2012 ClojuTRE Retro Edition)
Clojutre Real Life (2012 ClojuTRE Retro Edition)Clojutre Real Life (2012 ClojuTRE Retro Edition)
Clojutre Real Life (2012 ClojuTRE Retro Edition)Metosin Oy
 
OSCON Presentation: Developing High Performance Websites and Modern Apps with...
OSCON Presentation: Developing High Performance Websites and Modern Apps with...OSCON Presentation: Developing High Performance Websites and Modern Apps with...
OSCON Presentation: Developing High Performance Websites and Modern Apps with...Doris Chen
 
All Day Hey! Unlocking The Power of CSS Grid Layout
All Day Hey! Unlocking The Power of CSS Grid LayoutAll Day Hey! Unlocking The Power of CSS Grid Layout
All Day Hey! Unlocking The Power of CSS Grid LayoutRachel Andrew
 

Mais procurados (10)

Designing with malli
Designing with malliDesigning with malli
Designing with malli
 
Malli: inside data-driven schemas
Malli: inside data-driven schemasMalli: inside data-driven schemas
Malli: inside data-driven schemas
 
Naked Performance With Clojure
Naked Performance With ClojureNaked Performance With Clojure
Naked Performance With Clojure
 
Exploring Canvas
Exploring CanvasExploring Canvas
Exploring Canvas
 
Vector Tile Caching: ArcStache
Vector Tile Caching: ArcStacheVector Tile Caching: ArcStache
Vector Tile Caching: ArcStache
 
Clojutre Real Life (2012 ClojuTRE Retro Edition)
Clojutre Real Life (2012 ClojuTRE Retro Edition)Clojutre Real Life (2012 ClojuTRE Retro Edition)
Clojutre Real Life (2012 ClojuTRE Retro Edition)
 
Es.next
Es.nextEs.next
Es.next
 
C++ L10-Inheritance
C++ L10-InheritanceC++ L10-Inheritance
C++ L10-Inheritance
 
OSCON Presentation: Developing High Performance Websites and Modern Apps with...
OSCON Presentation: Developing High Performance Websites and Modern Apps with...OSCON Presentation: Developing High Performance Websites and Modern Apps with...
OSCON Presentation: Developing High Performance Websites and Modern Apps with...
 
All Day Hey! Unlocking The Power of CSS Grid Layout
All Day Hey! Unlocking The Power of CSS Grid LayoutAll Day Hey! Unlocking The Power of CSS Grid Layout
All Day Hey! Unlocking The Power of CSS Grid Layout
 

Destaque

Serious Animation (an introduction to Web Animations)
Serious Animation (an introduction to Web Animations)Serious Animation (an introduction to Web Animations)
Serious Animation (an introduction to Web Animations)brianskold
 
HxRefactored: Rebounding with Web Animation by Nick Snyder
HxRefactored: Rebounding with Web Animation by Nick SnyderHxRefactored: Rebounding with Web Animation by Nick Snyder
HxRefactored: Rebounding with Web Animation by Nick SnyderHxRefactored
 
Crafting animation on the web
Crafting animation on the webCrafting animation on the web
Crafting animation on the webBenjy Stanton
 
Web Animation Buffet
Web Animation BuffetWeb Animation Buffet
Web Animation Buffetjoshsager
 
HTML5 Animation in Mobile Web Games
HTML5 Animation in Mobile Web GamesHTML5 Animation in Mobile Web Games
HTML5 Animation in Mobile Web Gameslivedoor
 
Designing Motion - FITC TO
Designing Motion - FITC TODesigning Motion - FITC TO
Designing Motion - FITC TOthisisportable
 
CSS3 Animation and Artful Storytelling: Adding Value to Children’s Ebooks - e...
CSS3 Animation and Artful Storytelling: Adding Value to Children’s Ebooks - e...CSS3 Animation and Artful Storytelling: Adding Value to Children’s Ebooks - e...
CSS3 Animation and Artful Storytelling: Adding Value to Children’s Ebooks - e...BookNet Canada
 
the rabbit and the tortoise
the rabbit and the tortoisethe rabbit and the tortoise
the rabbit and the tortoisethreepointone
 
Css3 animation
Css3 animationCss3 animation
Css3 animationTed Hsu
 
The Future State of Layout
The Future State of LayoutThe Future State of Layout
The Future State of LayoutStephen Hay
 
Understanding Computers: Today and Tomorrow, 13th Edition Chapter 10 - Multim...
Understanding Computers: Today and Tomorrow, 13th Edition Chapter 10 - Multim...Understanding Computers: Today and Tomorrow, 13th Edition Chapter 10 - Multim...
Understanding Computers: Today and Tomorrow, 13th Edition Chapter 10 - Multim...yaminohime
 
CSS Animations & Transitions
CSS Animations & TransitionsCSS Animations & Transitions
CSS Animations & TransitionsEdward Meehan
 
Experience Themes: An Element of Story Applied to Design
Experience Themes: An Element of Story Applied to DesignExperience Themes: An Element of Story Applied to Design
Experience Themes: An Element of Story Applied to DesignCindy Chastain
 
Introduction to CSS3
Introduction to CSS3Introduction to CSS3
Introduction to CSS3Doris Chen
 

Destaque (20)

Serious Animation (an introduction to Web Animations)
Serious Animation (an introduction to Web Animations)Serious Animation (an introduction to Web Animations)
Serious Animation (an introduction to Web Animations)
 
Animation
AnimationAnimation
Animation
 
HxRefactored: Rebounding with Web Animation by Nick Snyder
HxRefactored: Rebounding with Web Animation by Nick SnyderHxRefactored: Rebounding with Web Animation by Nick Snyder
HxRefactored: Rebounding with Web Animation by Nick Snyder
 
Crafting animation on the web
Crafting animation on the webCrafting animation on the web
Crafting animation on the web
 
Web Animation Buffet
Web Animation BuffetWeb Animation Buffet
Web Animation Buffet
 
HTML5 Animation in Mobile Web Games
HTML5 Animation in Mobile Web GamesHTML5 Animation in Mobile Web Games
HTML5 Animation in Mobile Web Games
 
Designing Motion - FITC TO
Designing Motion - FITC TODesigning Motion - FITC TO
Designing Motion - FITC TO
 
CSS3 Animation and Artful Storytelling: Adding Value to Children’s Ebooks - e...
CSS3 Animation and Artful Storytelling: Adding Value to Children’s Ebooks - e...CSS3 Animation and Artful Storytelling: Adding Value to Children’s Ebooks - e...
CSS3 Animation and Artful Storytelling: Adding Value to Children’s Ebooks - e...
 
CSS3 Animations
CSS3 AnimationsCSS3 Animations
CSS3 Animations
 
the rabbit and the tortoise
the rabbit and the tortoisethe rabbit and the tortoise
the rabbit and the tortoise
 
Css3 animation
Css3 animationCss3 animation
Css3 animation
 
Fastest css3 animations
Fastest css3 animations Fastest css3 animations
Fastest css3 animations
 
The Future State of Layout
The Future State of LayoutThe Future State of Layout
The Future State of Layout
 
Session and cookies ,get and post methods
Session and cookies ,get and post methodsSession and cookies ,get and post methods
Session and cookies ,get and post methods
 
Understanding Computers: Today and Tomorrow, 13th Edition Chapter 10 - Multim...
Understanding Computers: Today and Tomorrow, 13th Edition Chapter 10 - Multim...Understanding Computers: Today and Tomorrow, 13th Edition Chapter 10 - Multim...
Understanding Computers: Today and Tomorrow, 13th Edition Chapter 10 - Multim...
 
CSS Animations & Transitions
CSS Animations & TransitionsCSS Animations & Transitions
CSS Animations & Transitions
 
Animation meet web
Animation meet webAnimation meet web
Animation meet web
 
Fundamental HTML5
Fundamental HTML5Fundamental HTML5
Fundamental HTML5
 
Experience Themes: An Element of Story Applied to Design
Experience Themes: An Element of Story Applied to DesignExperience Themes: An Element of Story Applied to Design
Experience Themes: An Element of Story Applied to Design
 
Introduction to CSS3
Introduction to CSS3Introduction to CSS3
Introduction to CSS3
 

Semelhante a Creating Beautiful CSS3 Animations - FITC Amsterdam 2016

I Can't Believe It's Not Flash
I Can't Believe It's Not FlashI Can't Believe It's Not Flash
I Can't Believe It's Not FlashThomas Fuchs
 
How to build a html5 websites.v1
How to build a html5 websites.v1How to build a html5 websites.v1
How to build a html5 websites.v1Bitla Software
 
Basics of html5, data_storage, css3
Basics of html5, data_storage, css3Basics of html5, data_storage, css3
Basics of html5, data_storage, css3Sreejith Nair
 
Keep calm and let's play CSS3
Keep calm and let's play CSS3Keep calm and let's play CSS3
Keep calm and let's play CSS3A2 Comunicação
 
A XSSmas carol
A XSSmas carolA XSSmas carol
A XSSmas carolcgvwzq
 
React & Radium (Colin Megill)
React & Radium (Colin Megill) React & Radium (Colin Megill)
React & Radium (Colin Megill) Future Insights
 
Make Your Animations Perform Well - JS Conf Budapest 2017
Make Your Animations Perform Well - JS Conf Budapest 2017 Make Your Animations Perform Well - JS Conf Budapest 2017
Make Your Animations Perform Well - JS Conf Budapest 2017 Anna Migas
 
Web Design Trends 2010 - What Is CSS3 All About?
Web Design Trends 2010 - What Is CSS3 All About?Web Design Trends 2010 - What Is CSS3 All About?
Web Design Trends 2010 - What Is CSS3 All About?Alexandra Lo Cascio
 
LESS : The dynamic stylesheet language
LESS : The dynamic stylesheet languageLESS : The dynamic stylesheet language
LESS : The dynamic stylesheet languageKatsunori Tanaka
 
Consuming web services asynchronously with Futures and Rx Observables (svcc, ...
Consuming web services asynchronously with Futures and Rx Observables (svcc, ...Consuming web services asynchronously with Futures and Rx Observables (svcc, ...
Consuming web services asynchronously with Futures and Rx Observables (svcc, ...Chris Richardson
 
Css3 transitions and animations + graceful degradation with jQuery
Css3 transitions and animations + graceful degradation with jQueryCss3 transitions and animations + graceful degradation with jQuery
Css3 transitions and animations + graceful degradation with jQueryAndrea Verlicchi
 
[A5]deview 2012 pt hds webkit_gpu
[A5]deview 2012 pt hds webkit_gpu[A5]deview 2012 pt hds webkit_gpu
[A5]deview 2012 pt hds webkit_gpuNAVER D2
 
Lift Presentation at DuSE VI
Lift Presentation at DuSE VILift Presentation at DuSE VI
Lift Presentation at DuSE VIPeter Robinett
 
Make your animations perform well
Make your animations perform wellMake your animations perform well
Make your animations perform wellAnna Migas
 
JavaOne 2009 - 2d Vector Graphics in the browser with Canvas and SVG
JavaOne 2009 -  2d Vector Graphics in the browser with Canvas and SVGJavaOne 2009 -  2d Vector Graphics in the browser with Canvas and SVG
JavaOne 2009 - 2d Vector Graphics in the browser with Canvas and SVGPatrick Chanezon
 
Joan Leon | Houdini, programando en CSS | Codemotion Madrid 2018
Joan Leon | Houdini, programando en CSS | Codemotion Madrid 2018Joan Leon | Houdini, programando en CSS | Codemotion Madrid 2018
Joan Leon | Houdini, programando en CSS | Codemotion Madrid 2018Codemotion
 
A brief look at CSS3 techniques by Aaron Rodgers, Web Designer @ vzaar.com
A brief look at CSS3 techniques by Aaron Rodgers, Web Designer @ vzaar.comA brief look at CSS3 techniques by Aaron Rodgers, Web Designer @ vzaar.com
A brief look at CSS3 techniques by Aaron Rodgers, Web Designer @ vzaar.comapplicake
 
HTML5 and CSS3 Shizzle
HTML5 and CSS3 ShizzleHTML5 and CSS3 Shizzle
HTML5 and CSS3 ShizzleChris Mills
 

Semelhante a Creating Beautiful CSS3 Animations - FITC Amsterdam 2016 (20)

Css3
Css3Css3
Css3
 
I Can't Believe It's Not Flash
I Can't Believe It's Not FlashI Can't Believe It's Not Flash
I Can't Believe It's Not Flash
 
How to build a html5 websites.v1
How to build a html5 websites.v1How to build a html5 websites.v1
How to build a html5 websites.v1
 
Basics of html5, data_storage, css3
Basics of html5, data_storage, css3Basics of html5, data_storage, css3
Basics of html5, data_storage, css3
 
Keep calm and let's play CSS3
Keep calm and let's play CSS3Keep calm and let's play CSS3
Keep calm and let's play CSS3
 
A XSSmas carol
A XSSmas carolA XSSmas carol
A XSSmas carol
 
React & Radium (Colin Megill)
React & Radium (Colin Megill) React & Radium (Colin Megill)
React & Radium (Colin Megill)
 
Make Your Animations Perform Well - JS Conf Budapest 2017
Make Your Animations Perform Well - JS Conf Budapest 2017 Make Your Animations Perform Well - JS Conf Budapest 2017
Make Your Animations Perform Well - JS Conf Budapest 2017
 
Web Design Trends 2010 - What Is CSS3 All About?
Web Design Trends 2010 - What Is CSS3 All About?Web Design Trends 2010 - What Is CSS3 All About?
Web Design Trends 2010 - What Is CSS3 All About?
 
LESS : The dynamic stylesheet language
LESS : The dynamic stylesheet languageLESS : The dynamic stylesheet language
LESS : The dynamic stylesheet language
 
Consuming web services asynchronously with Futures and Rx Observables (svcc, ...
Consuming web services asynchronously with Futures and Rx Observables (svcc, ...Consuming web services asynchronously with Futures and Rx Observables (svcc, ...
Consuming web services asynchronously with Futures and Rx Observables (svcc, ...
 
Css3 transitions and animations + graceful degradation with jQuery
Css3 transitions and animations + graceful degradation with jQueryCss3 transitions and animations + graceful degradation with jQuery
Css3 transitions and animations + graceful degradation with jQuery
 
[A5]deview 2012 pt hds webkit_gpu
[A5]deview 2012 pt hds webkit_gpu[A5]deview 2012 pt hds webkit_gpu
[A5]deview 2012 pt hds webkit_gpu
 
Lift Presentation at DuSE VI
Lift Presentation at DuSE VILift Presentation at DuSE VI
Lift Presentation at DuSE VI
 
Make your animations perform well
Make your animations perform wellMake your animations perform well
Make your animations perform well
 
JavaOne 2009 - 2d Vector Graphics in the browser with Canvas and SVG
JavaOne 2009 -  2d Vector Graphics in the browser with Canvas and SVGJavaOne 2009 -  2d Vector Graphics in the browser with Canvas and SVG
JavaOne 2009 - 2d Vector Graphics in the browser with Canvas and SVG
 
Joan Leon | Houdini, programando en CSS | Codemotion Madrid 2018
Joan Leon | Houdini, programando en CSS | Codemotion Madrid 2018Joan Leon | Houdini, programando en CSS | Codemotion Madrid 2018
Joan Leon | Houdini, programando en CSS | Codemotion Madrid 2018
 
Css3 101
Css3 101Css3 101
Css3 101
 
A brief look at CSS3 techniques by Aaron Rodgers, Web Designer @ vzaar.com
A brief look at CSS3 techniques by Aaron Rodgers, Web Designer @ vzaar.comA brief look at CSS3 techniques by Aaron Rodgers, Web Designer @ vzaar.com
A brief look at CSS3 techniques by Aaron Rodgers, Web Designer @ vzaar.com
 
HTML5 and CSS3 Shizzle
HTML5 and CSS3 ShizzleHTML5 and CSS3 Shizzle
HTML5 and CSS3 Shizzle
 

Mais de Rami Sayar

Introduction to React Native
Introduction to React NativeIntroduction to React Native
Introduction to React NativeRami Sayar
 
FITC - Exploring Art-Directed Responsive Images
FITC - Exploring Art-Directed Responsive ImagesFITC - Exploring Art-Directed Responsive Images
FITC - Exploring Art-Directed Responsive ImagesRami Sayar
 
Web a Quebec - JS Debugging
Web a Quebec - JS DebuggingWeb a Quebec - JS Debugging
Web a Quebec - JS DebuggingRami Sayar
 
An Intense Overview of the React Ecosystem
An Intense Overview of the React EcosystemAn Intense Overview of the React Ecosystem
An Intense Overview of the React EcosystemRami Sayar
 
Here Be Dragons - Debugging WordPress
Here Be Dragons - Debugging WordPressHere Be Dragons - Debugging WordPress
Here Be Dragons - Debugging WordPressRami Sayar
 
FITC - Here Be Dragons: Advanced JavaScript Debugging
FITC - Here Be Dragons: Advanced JavaScript DebuggingFITC - Here Be Dragons: Advanced JavaScript Debugging
FITC - Here Be Dragons: Advanced JavaScript DebuggingRami Sayar
 
What's New in ES6 for Web Devs
What's New in ES6 for Web DevsWhat's New in ES6 for Web Devs
What's New in ES6 for Web DevsRami Sayar
 
Scalable Django Architecture
Scalable Django ArchitectureScalable Django Architecture
Scalable Django ArchitectureRami Sayar
 
The State of WebSockets in Django
The State of WebSockets in DjangoThe State of WebSockets in Django
The State of WebSockets in DjangoRami Sayar
 
FITC - Bootstrap Unleashed
FITC - Bootstrap UnleashedFITC - Bootstrap Unleashed
FITC - Bootstrap UnleashedRami Sayar
 
FITC - Node.js 101
FITC - Node.js 101FITC - Node.js 101
FITC - Node.js 101Rami Sayar
 
FITC - Data Visualization in Practice
FITC - Data Visualization in PracticeFITC - Data Visualization in Practice
FITC - Data Visualization in PracticeRami Sayar
 

Mais de Rami Sayar (12)

Introduction to React Native
Introduction to React NativeIntroduction to React Native
Introduction to React Native
 
FITC - Exploring Art-Directed Responsive Images
FITC - Exploring Art-Directed Responsive ImagesFITC - Exploring Art-Directed Responsive Images
FITC - Exploring Art-Directed Responsive Images
 
Web a Quebec - JS Debugging
Web a Quebec - JS DebuggingWeb a Quebec - JS Debugging
Web a Quebec - JS Debugging
 
An Intense Overview of the React Ecosystem
An Intense Overview of the React EcosystemAn Intense Overview of the React Ecosystem
An Intense Overview of the React Ecosystem
 
Here Be Dragons - Debugging WordPress
Here Be Dragons - Debugging WordPressHere Be Dragons - Debugging WordPress
Here Be Dragons - Debugging WordPress
 
FITC - Here Be Dragons: Advanced JavaScript Debugging
FITC - Here Be Dragons: Advanced JavaScript DebuggingFITC - Here Be Dragons: Advanced JavaScript Debugging
FITC - Here Be Dragons: Advanced JavaScript Debugging
 
What's New in ES6 for Web Devs
What's New in ES6 for Web DevsWhat's New in ES6 for Web Devs
What's New in ES6 for Web Devs
 
Scalable Django Architecture
Scalable Django ArchitectureScalable Django Architecture
Scalable Django Architecture
 
The State of WebSockets in Django
The State of WebSockets in DjangoThe State of WebSockets in Django
The State of WebSockets in Django
 
FITC - Bootstrap Unleashed
FITC - Bootstrap UnleashedFITC - Bootstrap Unleashed
FITC - Bootstrap Unleashed
 
FITC - Node.js 101
FITC - Node.js 101FITC - Node.js 101
FITC - Node.js 101
 
FITC - Data Visualization in Practice
FITC - Data Visualization in PracticeFITC - Data Visualization in Practice
FITC - Data Visualization in Practice
 

Último

Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...gurkirankumar98700
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilV3cube
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEarley Information Science
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 

Último (20)

Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of Brazil
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 

Creating Beautiful CSS3 Animations - FITC Amsterdam 2016

  • 2. 2 . 1 AGENDA History of Animation on the Web Introducing CSS3 Animations Browser Compatibility CSS3 Animation Libraries Principles for Beautiful Animations
  • 3. 2 . 2 ASSUMPTIONS You know what the web is… Working knowledge of HTML5 & CSS3. Slides will be made available on SlideShare.net/RamiSayar
  • 4. 2 . 32 . 43 . 1
  • 6. 4 . 1 AND THEN THERE WAS FLASH
  • 7. 4 . 2 IT WAS A VERY DARK TIME FOR THE WEB. I CAN’T BELIEVE THIS STILL ...EXISTS
  • 8. 4 . 3 CLASSIC FLASH ANIMATIONS
  • 9. 4 . 4 Hop It - Simon's Cat
  • 10. 4 . 5 Animator vs. Animation (original)
  • 11. 4 . 6 Animator vs. Animation II (original)
  • 12. 4 . 7 THINGS DIDN'T END WELL...
  • 13. 4 . 8 APRIL 2010, STEVE JOBS WRITES “THOUGHTS ON FLASH”
  • 14. 4 . 94 . 10 RIP FLASH. 2015
  • 15. 4 . 11 BUT ONE MORE FOR OLD TIMES SAKE Sketchy Ice Creams from Birdbox Studio
  • 16. 5 . 1 WHILE FLASH EXISTED, WE HAD JAVASCRIPT & DHTML
  • 17. 5 . 2 DHTML IS THE COMBINATION OF HTML, CSS AND JAVASCRIPT. Animate text and images in their document, independently moving each element from any starting point to any ending point, following a predetermined path or one chosen by the user. Embed a ticker that automatically refreshes its content with the latest news, stock quotes, or other data. Use a form to capture user input, and then process, verify and respond to that data without having to send data back to the server. Include rollover buttons or drop-down menus.
  • 18. 5 . 3 DRUNK HARLEQUIN TEXT
  • 19. 5 . 4 DHTML CODE SAMPLE function splat(text){ // randomize text color, size, and weight text=text.substring(0,text.length); var fs=.5 for(i=0;text.length > i;i++){ f=Math.random(); if (Math.abs(f-fs) < .11) {f=Math.random()}; if (Math.abs(f-fs) < .11) {f=Math.random()}; if (f<.1) {c='00ffff'}; if (f>=.1 && f<.2) {c='7cfc00'}; if (f>=.2 && f<.3) {c='6495ed'}; if (f>=.3 && f<.4) {c='ffd700'}; if (f>=.4 && f<.5) {c='ff7f50'}; if (f>=.5 && f<.6) {c='ff00ff'}; if (f>=.6 && f<.7) {c='ccff00'}; if (f>=.7 && f<.8) {c='ff6964'}; if (f>=.8 && f<.9) {c='ff4500'}; if (f>=.9) {c='dc143c'};
  • 20. 6 JAVASCRIPT AND HTML5 CANVAS EXAMPLES: Tearable Cloth Free Rider HD Canvas is great for big, complex animations but it absolutely kills accessibility on your website. Not to mention that the JavaScript code quickly becomes complicated.
  • 21. 7 HISTORY OF ANIMATIONS ON THE WEB 1987 – Initial release of Graphics Interchange Format 1996 – Initial release of Adobe Flash Player 1997 – Netscape releases the “layers” feature in Netscape 4. Layers was a precursor to div. Subsequently, dropped for divs. JavaScript animations popular, part of a set of techniques called Dynamic HTML. Standards movement contributed to death of DHTML. 2004 – HTML5 Canvas Introduced by Apple in WebKit. 2008 – Initial release of Animated Portable Network Graphics (apng) 2009 – Initial Draft of CSS Animations (CSS3 Module) 2012-2016 – Resurgence of GIF in popularity???
  • 22. 89 . 1 INTRODUCING CSS3 ANIMATIONS
  • 23. 9 . 2 INTRODUCING CSS3 ANIMATIONS CSS3 Animations can be performed with 3 different techniques: Transitions Transforms Animations (Narrow Definition)
  • 24. 10 . 1 CSS3 TRANSITIONS
  • 25. 10 . 2 CSS3 TRANSITIONS transition: [ <transition-property> || <transition-duration> || <transition-timing-function> || <transition-delay> ] transition-property includes color, width, height, background- color, padding, margin, top, right, bottom, left, font-size, font- weight, etc. See W3C Spec.
  • 26. 10 . 3 CSS3 TRANSITIONS transition: [ <transition-property> || <transition-duration> || <transition-timing-function> || <transition-delay> ] transition-duration is how long the animation takes in seconds. transition-delay is how long the animation waits before changing the transition-property.
  • 27. 10 . 4 CSS3 TRANSITIONS transition: [ <transition-property> || <transition-duration> || <transition-timing-function> || <transition-delay> ] transition-timing-function determines how intermediate values of the transition are calculated. Only two classes of timing functions: cubic-bezier() and steps() functions.
  • 28. 10 . 5 CSS3 TRANSITIONS – TIMING FUNCTIONS
  • 30. 10 . 6 CSS3 TRANSITIONS – CUBIC-BEZIER() cubic-bezier() defines a cubic Bézier curve Curves are continuous, sometimes called easing functions. Reference MDN
  • 31. 10 . 7 CSS3 TRANSITIONS – CUBIC-BEZIER() Defined by four points P0, P1, P2, and P3. P0 and P3 are the start and the end of the curve. In CSS3, P0 is always set to (0, 0) and represents the initial time and the initial state, P3 is (1, 1) and represents the final time and the final state. Reference MDN
  • 32. CSS3 TRANSITIONS – CUBIC-BEZIER()
  • 34. 10 . 9 CSS3 TRANSITIONS – CUBIC-BEZIER() Invalid curves are possible and cause the entire property to be ignored. P1 or P2 ordinate outside the [0, 1] range may generate bouncing effects. cubic-bezier(x1, y1, x2, y2);
  • 35. 10 . 10 CSS3 TRANSITIONS – CUBIC-BEZIER() Common cubic bezier are named in CSS3. Cheat Sheet easings.net
  • 36. 10 . 11 CSS3 TRANSITIONS – STEPS() steps(number_of_steps, direction) defines a step function with the direction indicating if it’s left/right-continuous. Direction is specified with start||end. Reference MDN
  • 37. CSS3 TRANSITIONS – STEPS() steps(2, start);
  • 39. 11 . 1 CSS3 TRANSFORMS 2D TRANSFORMS: transform: skew(x, y | <angle>) || scale(x, y | <length> or <percentage>) || rotate(angle | <angle>) || translate(x, y | <length> or <percentage>)
  • 40. 11 . 2 CSS3 2D TRANSFORMS CODE SAMPLE #twodtrans-1{ transform: skew(10deg, 10deg); } #twodtrans-2{ transform: scale(2, 1); } #twodtrans-3{ transform: rotate(60deg); } #twodtrans-4{ transform: translate(-10px, 50px); }
  • 41. 11 . 3 CSS3 TRANSFORMS 3D TRANSFORMS: transform: translate3d(x, y, z | <length> or <percentage>) /* Except z=<length> */ || scale3d(x, y, z | <number>) || rotateX(<angle>) || rotateY(<angle>) || rotateZ(<angle>) Perspective and perspective-origin set user’s perspective and vanishing point. There are other properties like: transform-box, transform-origin, transform-style, backface-visibility.
  • 42. 11 . 4 CSS3 3D TRANSFORMS CODE SAMPLE #threedtrans-1{ transform: rotateX(180deg); } #threedtrans-2{ transform: rotateY(180deg); } #threedtrans-3{ transform: rotateZ(180deg); } /* perspective: 800px; perspective-origin: 50% 100px; */
  • 43. 12 . 1 CSS3 ANIMATIONS - @KEYFRAMES @keyframes define what an animation looks like at each stage. @keyframes are composed of three parts: name - name of the animation stage – a percentage used to define the properties at that stage. 0% (also can use from) and 100% (also can use to) have to be defined. properties – CSS properties
  • 44. 12 . 2 CSS3 ANIMATIONS - @KEYFRAMES @keyframes name { 0% {/*can use from */ top: 0; } 50% { top: 30px; } 100% {/* can use to*/ top: 0; } }
  • 45. 13 . 1 CSS3 ANIMATIONS - ANIMATION
  • 46. 13 . 2 CSS3 ANIMATIONS - ANIMATION Animation does two things: Assign the @keyframes to the elements. Define how it is animated. #div { animation-name: keyframe-name; animation-duration: 1s; animation-timing-function: ease; }
  • 47. 13 . 3 CSS3 ANIMATIONS - ANIMATION PROPERTIES Animation Properties: animation-name: name (Default: none) animation-duration: time of animation in seconds (Default: 0s) animation-timing-function: timing function, remember cubic bezier curves (Default: ease) animation-delay: delay to start of animation (Default: 0s)
  • 48. 13 . 4 CSS3 ANIMATIONS - ANIMATION PROPERTIES Animation Properties: animation-iteration-count: times to run the animation (Default: 1) animation-direction: direction to play the animation, normal || reverse || alternate || alternate-reverse (Default: normal) animation-fill-mode: how should CSS apply styles, none || forwards || backwards || both (Default: none) animation-play-state: animation running || paused (Default: running)
  • 49. 13 . 5 CSS3 ANIMATIONS - ANIMATION PROPERTIES Animation Shorthand Syntax: animation: [animation-name] [animation-duration] [animation-timing-function] [animation-delay] [animation-iteration-count];
  • 50. 13 . 6 CSS3 ANIMATION CODE SAMPLE @keyframes fadeOut { 0% {opacity: 1;} 100% {opacity: 0;} } @keyframes pulse { 0% { transform: scale(1); } 50% { transform: scale(1.2); } 100% { transform: scale(1); } } #css3animation{ animation-name: pulse, fadeOut; animation-duration: 1s, 5s; animation-delay: 0s, 5s; animation-iteration-count: infinite, infinite; animation-play-state: paused; }
  • 51. 13 . 7 BEAUTIFUL CSS ANIMATION EXAMPLES CSS 3D Solar System Pure CSS3 AT-AT Walker Stretchy Cat
  • 57. 15 . 6 HANDLING BROWSER PREFIXES SANELY – AUTOPREFIXER plugin to parse CSS and add vendor prefixes to CSS rules using values from . Can add to Grunt and Gulp. PostCSS Can I Use
  • 58. @keyframes name { 0% { top: 0; } 50% { top: 30px; } 100% { top: 0; } }
  • 59. 15 . 7 15 . 8 BECOMES
  • 60. @-webkit-keyframes name { 0% { top: 0; } 50% { top: 30px; } 100% { top: 0; } } @keyframes name { 0% { top: 0; } 50% { top: 30px; }
  • 61. 15 . 9 15 . 10 HANDLING BROWSER PREFIXES SANELY – BOURBON.IO Simple mixins library for Sass. Using @include to output prefixes. box:hover { @include animation(scale 1.0s ease-in, slide 2.0s ease); }
  • 62. 16 . 1 CSS3 ANIMATION LIBRARIES animate.css is a bunch of cool, fun, and cross-browser animations for you to use in your projects. Great for emphasis, home pages, sliders, and general just-add-water-awesomeness. Demo Magic.css is a bunch of CSS3 Animations with special effects. Demo
  • 63. 16 . 2 THE GEOCITIES-IZER
  • 64. 17 . 1 PRINCIPLES FOR BEAUTIFUL ANIMATIONS
  • 65. 17 . 2 DISNEY ANIMATION: THE ILLUSION OF LIFE Book by Ollie Johnston and Frank Thomas, two of the animation masters at Disney's during the Golden Age of animation, referred by Walt Disney as his "Nine Old Men".
  • 66. 17 . 3 PRINCIPLE 1: SQUASH AND STRETCH Give a sense of weight and flexibility to drawn objects.
  • 67. 17 . 4 PRINCIPLE 2: ANTICIPATION Prepare the audience for an action, and to make the action appear more realistic. Ex. A dancer jumping off the floor has to bend his knees first.
  • 68. 17 . 5 PRINCIPLE 3: STAGING Direct the audience's attention and make it clear what is important.
  • 69. 17 . 6 PRINCIPLE 4: STRAIGHT AHEAD ACTION AND POSE TO POSE "Straight ahead action" means drawing out a scene frame by frame from beginning to end, while "pose to pose" involves starting with drawing a few key frames, and then filling in the intervals later.
  • 70. 17 . 7 PRINCIPLE 5: FOLLOW THROUGH AND OVERLAPPING ACTION Give the impression that characters follow the laws of physics, including the principle of inertia.
  • 71. 17 . 8 PRINCIPLE 6: SLOW IN AND SLOW OUT Accelerate and Decelerate.
  • 72. 17 . 9 PRINCIPLE 7: FOLLOW ARCS
  • 73. 17 . 10 PRINCIPLE 8: SECONDARY ACTION
  • 74. 17 . 11 PRINCIPLE 9: TIMING (AKA FRAMES/SECOND)
  • 75. 17 . 12 PRINCIPLE 10: EXAGGERATION
  • 76. 17 . 13 PRINCIPLE 11: SOLID DRAWING
  • 77. 17 . 14 PRINCIPLE 12: APPEAL AKA CHARISMA
  • 78. 17 . 15 PURE CSS FAIL WHALE
  • 79. 18 . 1 WHAT DID WE LEARN? History of Animation on the Web CSS3 Animations Transitions Transforms @keyframes & Animations Browser Compatibility Autoprefixer Bourbon.io CSS3 Animation Libraries Animate.css
  • 80. 18 . 2 THANK YOU! QUESTIONS? ALSO, I WOULD LOVE TO SPEAK MORE IN EUROPE ;) TW: | GH:@RAMISAYAR @SAYAR SLIDESHARE.NET/RAMISAYAR
  • 81. 18 . 3 RESOURCES, REFERENCES, LINKS http://dailyjs.com/2010/06/27/167-history-of-javascript/ http://www.nytimes.com/2013/02/14/fashion/common-on-early-i files-make-comeback.html?_r=1& https://hg.csswg.org/drafts/log/2579c1842a7c/css3- animations/Overview.src.html http://www.peterbe.com/plog/worst-flash-site-of-the-year-2010 https://www.kirupa.com/html5/creating_simple_html5_canvas_a http://stackoverflow.com/questions/11182478/performance-css3 vs-html5-canvas
  • 82. 18 . 4 RESOURCES, REFERENCES, LINKS http://css3.bradshawenterprises.com/transitions/#delays https://developer.mozilla.org/en- US/docs/Web/CSS/CSS_Transitions/Using_CSS_transitions https://developer.mozilla.org/en-US/docs/Web/CSS/timing- function https://robots.thoughtbot.com/css-animation-for-beginners https://www.smashingmagazine.com/2011/09/the-guide-to- css-animation-principles-and-examples/ https://ihatetomatoes.net/the-guide-to-css-animations-for- the-web/ http://www.creativebloq.com/css3/animation-with-css3- 712437