Animation In Responsive Design

40

Transcript of Animation In Responsive Design

Page 1: Animation In Responsive Design
Page 2: Animation In Responsive Design
Page 3: Animation In Responsive Design

Problem: Motion that becomes distracting

in smaller spaces

:(

Page 4: Animation In Responsive Design

Simplify For Smaller Spaces

Page 5: Animation In Responsive Design
Page 6: Animation In Responsive Design
Page 7: Animation In Responsive Design
Page 8: Animation In Responsive Design
Page 9: Animation In Responsive Design

Problem: Animation that isn’t readable

on smaller viewports

:(

Page 10: Animation In Responsive Design

Responsive Choreography

Page 11: Animation In Responsive Design

Solution 1: JavaScript & multiple timelines to the rescue!

Page 12: Animation In Responsive Design
Page 13: Animation In Responsive Design
Page 14: Animation In Responsive Design
Page 15: Animation In Responsive Design

1 2 3

1 timeline

Page 16: Animation In Responsive Design

3

2

1 timeline

timeline

timeline

Page 17: Animation In Responsive Design
Page 18: Animation In Responsive Design

Solution 2: Responsive SVG to the rescue!

Page 19: Animation In Responsive Design
Page 20: Animation In Responsive Design
Page 21: Animation In Responsive Design

Responsive SVG AnimationDifferent CSS animations at different breakpoints

Adjusting SVG viewBox property with JavaScript breakpoints

See Sarah Drasner’s Complex Animations slides: slides.com/sdrasner/cssdevcon

Page 22: Animation In Responsive Design

Solution 3: Art Direction to the rescue!

Page 23: Animation In Responsive Design
Page 24: Animation In Responsive Design
Page 25: Animation In Responsive Design
Page 26: Animation In Responsive Design

Animation & Performance

Page 27: Animation In Responsive Design

Problem: Animation that is slow and sad on less

powerful devices

:(

Page 28: Animation In Responsive Design
Page 29: Animation In Responsive Design

Most Performant Propertiestransforms (position, scale, rotation…)

opacity

Page 30: Animation In Responsive Design

csstriggers.com

Page 31: Animation In Responsive Design

More Tricksthe translate 3D “hack”

the will-change property

Page 32: Animation In Responsive Design

dev.opera.com/articles/css-will-change-property/

Page 33: Animation In Responsive Design

Problem: Everyone hates waiting but loading

things takes time

:(

Page 34: Animation In Responsive Design

Perceived Performance Hinting at content before it’s actually available

makes wait times feel faster.

Page 35: Animation In Responsive Design

“Our findings indicate that the psychological mechanism of transitions is completely different from progress bars”

Page 36: Animation In Responsive Design
Page 37: Animation In Responsive Design
Page 38: Animation In Responsive Design

viget.com/inspire/experiments-in-loading-how-long-will-you-wait

Page 39: Animation In Responsive Design
Page 40: Animation In Responsive Design

@vlh uianimationewsletter.com