SlideShare a Scribd company logo
Front End Workshops
CSS Animations & cool effects
Toni Camí & Jorge López
jlopez@visual-engin.com
tcami@visual-engin.com
Cool Effects
Examples
Parallax effect
CSS Transitions
CSS Transitions allows property changes in
CSS properties to occur smoothly over a
specified duration.
Transition-duration: Specifies the duration over which transitions should occur. You
can specify a single duration that applies to all properties during the transition, or
multiple values to allow each property to transition over a different period of time.
Transition-property: Specifies the name or names of the CSS properties to which
transitions should be applied.
Transition-delay: Defines how long to wait between the time a property is changed
and the transition actually begins.
Transition-timing-function: Specifies a function to define how intermediate values
for properties are computed. Timing functions determine how intermediate values of
the transition are calculated. Most timing functions can be specified by providing the
graph of the corresponding function, as defined by four points defining a cubic bezier.
Easyng website
Transition-property CSS
Workshop 18: CSS Animations & cool effects
Transformations
CSS Transform property allow you to visually
manipulate an element by skewing, rotating,
translating or scaling.
scale: affects the size of the element. This also applies to the font-size, padding,
height, and width of an element, too.
skewX and skewY: tilts an element to the left or right, like turning a triangle into a
parallelogram. There is no shorthand skew property.
translate: moves an element sideways or up and down.
rotate: rotates the element clockwise from its current position.
Transformations-properties CSS
CSS Animations
CSS animations make it possible to animate
transitions from one CSS style configuration to
another.
Animations consist of two components, a style describing the CSS animation and a set
of keyframes that indicate the start and end states of the animation's style, as well as
possible intermediate waypoints.
Advantages:
1. No JS is required.
2. Animations run well, rendering…
3. The browser optimize performance and efficiency. For example, reducing
the update frequency of animations running in tabs that aren't currently visible.
animation-delay
Configures the delay between the time the element is loaded and the beginning of the
animation sequence.
animation-direction
Configures whether or not the animation should alternate direction on each run
through the sequence or reset to the start point and repeat itself.
animation-duration
Configures the length of time that an animation should take to complete one cycle.
animation-iteration-count
Configures the number of times the animation should repeat; you can specify infinite
to repeat the animation indefinitely.
animation-name
Specifies the name of the @keyframes at-rule describing the animation's keyframes.
animation-play-state
Lets you pause and resume the animation sequence.
animation-timing-function
Configures the timing of the animation; that is, how the animation transitions through
keyframes, by establishing acceleration curves.
animation-fill-mode
Configures what values are applied by the animation before and after it is executing.
Animation-properties CSS
Keyframes
Keyframes are used to specify the values for
the animating properties at various points
during the animation.
@keyframes identifier (which will be referenced using animation-name:
identifier) {
CSS style rules
}
● Keyframes use a <percentage> to indicate the time during the animation sequence
at which they take place.
● 0% Start / 100% End.
● These two times are so important, they have special aliases: from and to.
● No negative
● No higher than 100%;
● You can optionally include additional keyframes that describe intermediate steps
between the start and end of the animation.
Hover
<body>
<div>
<button class="trigger">
Menu <span></span>
</button>
</div>
</body>
</html>
.trigger {
position: relative;
background: #444;
width: 120px;
height: 120px;
border: none;
border-radius: 50%;
/* img replace */
overflow: hidden;
text-indent: 100%;
color: transparent;
white-space: nowrap;
cursor: pointer;
}
.trigger span,
.trigger span::before,
.trigger span::after {
position: absolute;
width: 44px;
height: 4px;
background: white;
border-radius: 4px;
}
.trigger span {
top: calc(50% - 2px);
left: calc(50% - 22px);
transition: transform .3s;
}
.trigger span::before,
.trigger span::after {
content: '';
left: 0;
transition: transform .3s, width .3s;
}
.trigger span::before {
bottom: 12px;
}
.trigger span::after {
top: 12px;
}
.trigger:hover span {
transform: rotate(180deg);
}
.trigger:hover span::before {
width: 50%;
transform: translateX(-2px) translateY(5px)
rotate(-45deg);
}
.trigger:hover span::after {
width: 50%;
transform: translateX(-2px) translateY(-5
px) rotate(45deg);
}
Background video
Example
http://dev2.slicejack.com/fullscreen-video-demo/index.html
<div class="fullscreen-bg">
<video loop muted autoplay poster="img/videoframe.jpg" class="fullscreen-bg__video">
<source src="video/big_buck_bunny.webm" type="video/webm">
<source src="video/big_buck_bunny.mp4" type="video/mp4">
<source src="video/big_buck_bunny.ogv" type="video/ogg">
</video>
</div>
.fullscreen-bg {
position: fixed;
top: 0;
right: 0;
bottom: 0;
left: 0;
overflow: hidden;
z-index: -100;
}
.fullscreen-bg__video {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
}
@media (min-aspect-ratio: 16/9) {
.fullscreen-bg__video {
height: 300%;
top: -100%;
}
}
@media (max-aspect-ratio: 16/9) {
.fullscreen-bg__video {
width: 300%;
left: -100%;
}
}
@media (max-width: 767px) {
.fullscreen-bg {
background: url('../img/videoframe.jpg')
center center / cover no-repeat;
}
.fullscreen-bg__video {
display: none;
}
}
CSS
Parallax effect
Speed, movement & position.
Elements behavior depends on the scroll.
You can add to Backgrounds, divs or sprites.
ONLY CSS
WITH JS
Example
http://jonathannicol.com/projects/parallax-scrolling/
Example download
<section id="home" data-type="background" data-speed="10" class="pages">
<article>I am absolute positioned</article>
</section>
<section id="about" data-type="background" data-speed="10" class="pages">
<article>Simple Parallax Scroll</article>
</section>
#about {
background: url(about-bg.jpg) 50% 0 repeat fixed; min-height:
1000px;
height: 1000px;
margin: 0 auto;
width: 100%;
max-width: 1920px;
position: relative;
-webkit-box-shadow: 0 0 50px rgba(0,0,0,0.8);
box-shadow: 0 0 50px rgba(0,0,0,0.8);
}
#about article {
height: 458px;
position: absolute;
text-align: center;
top: 150px;
width: 100%;
}
#home {
background: url(home-bg.jpg) 50% 0 repeat fixed; min-height:
1000px;
height: 1000px;
margin: 0 auto;
width: 100%;
max-width: 1920px;
position: relative;
}
#home article {
height: 458px;
position: absolute;
text-align: center;
top: 150px;
width: 100%;
}
<div id="parallax-bg3">
<img id="bg3-1" src="img/balloon.png" width="529" height="757" alt="Montgolfier hot air balloon"/>
<img id="bg3-2" src="img/balloon2.png" width="603" height="583" alt="Frameless parachute"/>
<img id="bg3-3" src="img/balloon3.png" width="446" height="713" alt="Blanchard's air balloon"/>
<img id="bg3-4" src="img/ground.png" width="1104" height="684" alt="Landscape with trees and cows"/>
</div>
<!-- Parallax midground clouds -->
<div id="parallax-bg2">
<img id="bg2-1" src="img/cloud-lg1.png" alt="cloud"/>
<img id="bg2-2" src="img/cloud-lg1.png" alt="cloud"/>
<img id="bg2-3" src="img/cloud-lg1.png" alt="cloud"/>
<img id="bg2-4" src="img/cloud-lg1.png" alt="cloud"/>
<img id="bg2-5" src="img/cloud-lg1.png" alt="cloud"/>
</div>
<!-- Parallax background clouds -->
<div id="parallax-bg1">
<img id="bg1-1" src="img/cloud-lg2.png" alt="cloud"/>
<img id="bg1-2" src="img/cloud-lg2.png" alt="cloud"/>
<img id="bg1-3" src="img/cloud-lg2.png" alt="cloud"/>
<img id="bg1-4" src="img/cloud-lg2.png" alt="cloud"/>
</div>
CSS
#parallax-bg3 {
z-index: 3;
position: fixed;
left: 50%; /* align left edge with center of viewport */
top: 0;
width: 940px;
margin-left: -470px; /* move left by half element's width */
}
#bg3-1 {
position: absolute;
top: -111px;
left: 355px;
}
#bg3-2 {
position: absolute;
top: 812px;
left: 321px;
}
JAVASCRIPT
function parallaxScroll(){
var scrolled = $(window).scrollTop();
$('#parallax-bg1').css('top',(0-(scrolled*.25))+'px');
$('#parallax-bg2').css('top',(0-(scrolled*.5))+'px');
$('#parallax-bg3').css('top',(0-(scrolled*.75))+'px');
}
Librerías CSS animation
http://www.minimamente.com/example/magic_animations/
http://ianlunn.github.io/Hover/#effects
http://daneden.github.io/animate.css/
http://h5bp.github.io/Effeckt.css/
Examples
- Example 2 Loaders: http://callmenick.com/_development/css-loaders-and-
spinners-2/
- Slack-CSS-Logo-master -> http://callmenick.com/_development/slack-
logo/
Un curso interesante para iniciarse en Animaciones con CSS:
https://codyhouse.co/course/mastering-css-transitions-transformations-
animations/
Thanks for your time!
:)
Workshop 18: CSS Animations & cool effects
Ad

More Related Content

What's hot (19)

Image Manipulation in WordPress 3.5 - WordCamp Phoenix 2013
Image Manipulation in WordPress 3.5 - WordCamp Phoenix 2013Image Manipulation in WordPress 3.5 - WordCamp Phoenix 2013
Image Manipulation in WordPress 3.5 - WordCamp Phoenix 2013
GetSource
 
SproutCore and the Future of Web Apps
SproutCore and the Future of Web AppsSproutCore and the Future of Web Apps
SproutCore and the Future of Web Apps
Mike Subelsky
 
HTML5: friend or foe (to Flash)?
HTML5: friend or foe (to Flash)?HTML5: friend or foe (to Flash)?
HTML5: friend or foe (to Flash)?
Remy Sharp
 
Quick ref capybara
Quick ref capybaraQuick ref capybara
Quick ref capybara
fatec
 
Ext JS Architecture Best Practices - Mitchell Simeons
Ext JS Architecture Best Practices - Mitchell SimeonsExt JS Architecture Best Practices - Mitchell Simeons
Ext JS Architecture Best Practices - Mitchell Simeons
Sencha
 
Custom post-framworks
Custom post-framworksCustom post-framworks
Custom post-framworks
Kiera Howe
 
Randomising css animations
Randomising css animationsRandomising css animations
Randomising css animations
asjb
 
CSS Grid Layout
CSS Grid LayoutCSS Grid Layout
CSS Grid Layout
Rachel Andrew
 
Bootstrap과 UI-Bootstrap
Bootstrap과 UI-BootstrapBootstrap과 UI-Bootstrap
Bootstrap과 UI-Bootstrap
WebFrameworks
 
Dynamic CSS: Transforms, Transitions, and Animation Basics
Dynamic CSS: Transforms, Transitions, and Animation BasicsDynamic CSS: Transforms, Transitions, and Animation Basics
Dynamic CSS: Transforms, Transitions, and Animation Basics
Beth Soderberg
 
Difference between java script and jquery
Difference between java script and jqueryDifference between java script and jquery
Difference between java script and jquery
Umar Ali
 
Your JavaScript Library
Your JavaScript LibraryYour JavaScript Library
Your JavaScript Library
Dmitry Baranovskiy
 
Animating an svg icon
Animating an svg iconAnimating an svg icon
Animating an svg icon
deepbidis
 
Angular를 활용한 웹 프론트단 개발과 2.0에서 달라진점
Angular를 활용한 웹 프론트단 개발과 2.0에서 달라진점Angular를 활용한 웹 프론트단 개발과 2.0에서 달라진점
Angular를 활용한 웹 프론트단 개발과 2.0에서 달라진점
Jeado Ko
 
Intro to Ember.JS 2016
Intro to Ember.JS 2016Intro to Ember.JS 2016
Intro to Ember.JS 2016
Sandino Núñez
 
Web Frontend development: tools and good practices to (re)organize the chaos
Web Frontend development: tools and good practices to (re)organize the chaosWeb Frontend development: tools and good practices to (re)organize the chaos
Web Frontend development: tools and good practices to (re)organize the chaos
Matteo Papadopoulos
 
Modular and Event-Driven JavaScript
Modular and Event-Driven JavaScriptModular and Event-Driven JavaScript
Modular and Event-Driven JavaScript
Eduardo Shiota Yasuda
 
Polymer 1.0
Polymer 1.0Polymer 1.0
Polymer 1.0
Cyril Balit
 
Landing Pages 101
Landing Pages 101Landing Pages 101
Landing Pages 101
Celeste Horgan
 
Image Manipulation in WordPress 3.5 - WordCamp Phoenix 2013
Image Manipulation in WordPress 3.5 - WordCamp Phoenix 2013Image Manipulation in WordPress 3.5 - WordCamp Phoenix 2013
Image Manipulation in WordPress 3.5 - WordCamp Phoenix 2013
GetSource
 
SproutCore and the Future of Web Apps
SproutCore and the Future of Web AppsSproutCore and the Future of Web Apps
SproutCore and the Future of Web Apps
Mike Subelsky
 
HTML5: friend or foe (to Flash)?
HTML5: friend or foe (to Flash)?HTML5: friend or foe (to Flash)?
HTML5: friend or foe (to Flash)?
Remy Sharp
 
Quick ref capybara
Quick ref capybaraQuick ref capybara
Quick ref capybara
fatec
 
Ext JS Architecture Best Practices - Mitchell Simeons
Ext JS Architecture Best Practices - Mitchell SimeonsExt JS Architecture Best Practices - Mitchell Simeons
Ext JS Architecture Best Practices - Mitchell Simeons
Sencha
 
Custom post-framworks
Custom post-framworksCustom post-framworks
Custom post-framworks
Kiera Howe
 
Randomising css animations
Randomising css animationsRandomising css animations
Randomising css animations
asjb
 
Bootstrap과 UI-Bootstrap
Bootstrap과 UI-BootstrapBootstrap과 UI-Bootstrap
Bootstrap과 UI-Bootstrap
WebFrameworks
 
Dynamic CSS: Transforms, Transitions, and Animation Basics
Dynamic CSS: Transforms, Transitions, and Animation BasicsDynamic CSS: Transforms, Transitions, and Animation Basics
Dynamic CSS: Transforms, Transitions, and Animation Basics
Beth Soderberg
 
Difference between java script and jquery
Difference between java script and jqueryDifference between java script and jquery
Difference between java script and jquery
Umar Ali
 
Animating an svg icon
Animating an svg iconAnimating an svg icon
Animating an svg icon
deepbidis
 
Angular를 활용한 웹 프론트단 개발과 2.0에서 달라진점
Angular를 활용한 웹 프론트단 개발과 2.0에서 달라진점Angular를 활용한 웹 프론트단 개발과 2.0에서 달라진점
Angular를 활용한 웹 프론트단 개발과 2.0에서 달라진점
Jeado Ko
 
Web Frontend development: tools and good practices to (re)organize the chaos
Web Frontend development: tools and good practices to (re)organize the chaosWeb Frontend development: tools and good practices to (re)organize the chaos
Web Frontend development: tools and good practices to (re)organize the chaos
Matteo Papadopoulos
 

Similar to Workshop 18: CSS Animations & cool effects (20)

Css3
Css3Css3
Css3
Knoldus Inc.
 
Tailwind Animation: How to Make Eye-Catching Websites
Tailwind Animation: How to Make Eye-Catching WebsitesTailwind Animation: How to Make Eye-Catching Websites
Tailwind Animation: How to Make Eye-Catching Websites
RonDosh
 
Css3
Css3Css3
Css3
Anjan Banda
 
GOTO Berlin - You can use CSS for that
GOTO Berlin - You can use CSS for thatGOTO Berlin - You can use CSS for that
GOTO Berlin - You can use CSS for that
Rachel Andrew
 
CSS3 TTA (Transform Transition Animation)
CSS3 TTA (Transform Transition Animation)CSS3 TTA (Transform Transition Animation)
CSS3 TTA (Transform Transition Animation)
창석 한
 
Css3
Css3Css3
Css3
Rahma Boufalgha
 
The Creative New World of CSS
The Creative New World of CSSThe Creative New World of CSS
The Creative New World of CSS
Rachel Andrew
 
Angular js animate shashikant bhongale -20-7-16
Angular js animate shashikant bhongale -20-7-16Angular js animate shashikant bhongale -20-7-16
Angular js animate shashikant bhongale -20-7-16
Shashikant Bhongale
 
HTML5 and CSS3 Shizzle
HTML5 and CSS3 ShizzleHTML5 and CSS3 Shizzle
HTML5 and CSS3 Shizzle
Chris Mills
 
html5_css3
html5_css3html5_css3
html5_css3
Sindh Madresatul Islam University
 
CSS and CSS3
CSS and CSS3CSS and CSS3
CSS and CSS3
Robyn Overstreet
 
HTML5 and CSS3 – exploring mobile possibilities - Frontend Conference Zürich
HTML5 and CSS3 – exploring mobile possibilities - Frontend Conference ZürichHTML5 and CSS3 – exploring mobile possibilities - Frontend Conference Zürich
HTML5 and CSS3 – exploring mobile possibilities - Frontend Conference Zürich
Robert Nyman
 
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
Thomas Fuchs
 
CSS Walktrough Internship Course
CSS Walktrough Internship CourseCSS Walktrough Internship Course
CSS Walktrough Internship Course
Zoltan Iszlai
 
Angular animate
Angular animateAngular animate
Angular animate
Yating Chatiron
 
Girl Develop It Cincinnati: Intro to HTML/CSS Class 4
Girl Develop It Cincinnati: Intro to HTML/CSS Class 4Girl Develop It Cincinnati: Intro to HTML/CSS Class 4
Girl Develop It Cincinnati: Intro to HTML/CSS Class 4
Erin M. Kidwell
 
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
Andrea Verlicchi
 
Filters and its types as wave shadow.docx
Filters and its types as wave shadow.docxFilters and its types as wave shadow.docx
Filters and its types as wave shadow.docx
Ramakrishna Reddy Bijjam
 
Blog skins396734
Blog skins396734Blog skins396734
Blog skins396734
pantangmrny
 
Html5
Html5Html5
Html5
Soliman ElSaber
 
Tailwind Animation: How to Make Eye-Catching Websites
Tailwind Animation: How to Make Eye-Catching WebsitesTailwind Animation: How to Make Eye-Catching Websites
Tailwind Animation: How to Make Eye-Catching Websites
RonDosh
 
GOTO Berlin - You can use CSS for that
GOTO Berlin - You can use CSS for thatGOTO Berlin - You can use CSS for that
GOTO Berlin - You can use CSS for that
Rachel Andrew
 
CSS3 TTA (Transform Transition Animation)
CSS3 TTA (Transform Transition Animation)CSS3 TTA (Transform Transition Animation)
CSS3 TTA (Transform Transition Animation)
창석 한
 
The Creative New World of CSS
The Creative New World of CSSThe Creative New World of CSS
The Creative New World of CSS
Rachel Andrew
 
Angular js animate shashikant bhongale -20-7-16
Angular js animate shashikant bhongale -20-7-16Angular js animate shashikant bhongale -20-7-16
Angular js animate shashikant bhongale -20-7-16
Shashikant Bhongale
 
HTML5 and CSS3 Shizzle
HTML5 and CSS3 ShizzleHTML5 and CSS3 Shizzle
HTML5 and CSS3 Shizzle
Chris Mills
 
HTML5 and CSS3 – exploring mobile possibilities - Frontend Conference Zürich
HTML5 and CSS3 – exploring mobile possibilities - Frontend Conference ZürichHTML5 and CSS3 – exploring mobile possibilities - Frontend Conference Zürich
HTML5 and CSS3 – exploring mobile possibilities - Frontend Conference Zürich
Robert Nyman
 
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
Thomas Fuchs
 
CSS Walktrough Internship Course
CSS Walktrough Internship CourseCSS Walktrough Internship Course
CSS Walktrough Internship Course
Zoltan Iszlai
 
Girl Develop It Cincinnati: Intro to HTML/CSS Class 4
Girl Develop It Cincinnati: Intro to HTML/CSS Class 4Girl Develop It Cincinnati: Intro to HTML/CSS Class 4
Girl Develop It Cincinnati: Intro to HTML/CSS Class 4
Erin M. Kidwell
 
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
Andrea Verlicchi
 
Blog skins396734
Blog skins396734Blog skins396734
Blog skins396734
pantangmrny
 
Ad

More from Visual Engineering (20)

Workshop 27: Isomorphic web apps with ReactJS
Workshop 27: Isomorphic web apps with ReactJSWorkshop 27: Isomorphic web apps with ReactJS
Workshop 27: Isomorphic web apps with ReactJS
Visual Engineering
 
Workshop iOS 4: Closures, generics & operators
Workshop iOS 4: Closures, generics & operatorsWorkshop iOS 4: Closures, generics & operators
Workshop iOS 4: Closures, generics & operators
Visual Engineering
 
Workshop iOS 3: Testing, protocolos y extensiones
Workshop iOS 3: Testing, protocolos y extensionesWorkshop iOS 3: Testing, protocolos y extensiones
Workshop iOS 3: Testing, protocolos y extensiones
Visual Engineering
 
Workshop iOS 2: Swift - Structures
Workshop iOS 2: Swift - StructuresWorkshop iOS 2: Swift - Structures
Workshop iOS 2: Swift - Structures
Visual Engineering
 
Workhop iOS 1: Fundamentos de Swift
Workhop iOS 1: Fundamentos de SwiftWorkhop iOS 1: Fundamentos de Swift
Workhop iOS 1: Fundamentos de Swift
Visual Engineering
 
Workshop 26: React Native - The Native Side
Workshop 26: React Native - The Native SideWorkshop 26: React Native - The Native Side
Workshop 26: React Native - The Native Side
Visual Engineering
 
Workshop 25: React Native - Components
Workshop 25: React Native - ComponentsWorkshop 25: React Native - Components
Workshop 25: React Native - Components
Visual Engineering
 
Workshop 24: React Native Introduction
Workshop 24: React Native IntroductionWorkshop 24: React Native Introduction
Workshop 24: React Native Introduction
Visual Engineering
 
Workshop 23: ReactJS, React & Redux testing
Workshop 23: ReactJS, React & Redux testingWorkshop 23: ReactJS, React & Redux testing
Workshop 23: ReactJS, React & Redux testing
Visual Engineering
 
Workshop 22: ReactJS Redux Advanced
Workshop 22: ReactJS Redux AdvancedWorkshop 22: ReactJS Redux Advanced
Workshop 22: ReactJS Redux Advanced
Visual Engineering
 
Workshop 22: React-Redux Middleware
Workshop 22: React-Redux MiddlewareWorkshop 22: React-Redux Middleware
Workshop 22: React-Redux Middleware
Visual Engineering
 
Workshop 21: React Router
Workshop 21: React RouterWorkshop 21: React Router
Workshop 21: React Router
Visual Engineering
 
Workshop 20: ReactJS Part II Flux Pattern & Redux
Workshop 20: ReactJS Part II Flux Pattern & ReduxWorkshop 20: ReactJS Part II Flux Pattern & Redux
Workshop 20: ReactJS Part II Flux Pattern & Redux
Visual Engineering
 
Workshop 19: ReactJS Introduction
Workshop 19: ReactJS IntroductionWorkshop 19: ReactJS Introduction
Workshop 19: ReactJS Introduction
Visual Engineering
 
Workshop 17: EmberJS parte II
Workshop 17: EmberJS parte IIWorkshop 17: EmberJS parte II
Workshop 17: EmberJS parte II
Visual Engineering
 
Workshop 16: EmberJS Parte I
Workshop 16: EmberJS Parte IWorkshop 16: EmberJS Parte I
Workshop 16: EmberJS Parte I
Visual Engineering
 
Workshop 15: Ionic framework
Workshop 15: Ionic frameworkWorkshop 15: Ionic framework
Workshop 15: Ionic framework
Visual Engineering
 
Workshop 14: AngularJS Parte III
Workshop 14: AngularJS Parte IIIWorkshop 14: AngularJS Parte III
Workshop 14: AngularJS Parte III
Visual Engineering
 
Workshop 13: AngularJS Parte II
Workshop 13: AngularJS Parte IIWorkshop 13: AngularJS Parte II
Workshop 13: AngularJS Parte II
Visual Engineering
 
Workshop 8: Templating: Handlebars, DustJS
Workshop 8: Templating: Handlebars, DustJSWorkshop 8: Templating: Handlebars, DustJS
Workshop 8: Templating: Handlebars, DustJS
Visual Engineering
 
Workshop 27: Isomorphic web apps with ReactJS
Workshop 27: Isomorphic web apps with ReactJSWorkshop 27: Isomorphic web apps with ReactJS
Workshop 27: Isomorphic web apps with ReactJS
Visual Engineering
 
Workshop iOS 4: Closures, generics & operators
Workshop iOS 4: Closures, generics & operatorsWorkshop iOS 4: Closures, generics & operators
Workshop iOS 4: Closures, generics & operators
Visual Engineering
 
Workshop iOS 3: Testing, protocolos y extensiones
Workshop iOS 3: Testing, protocolos y extensionesWorkshop iOS 3: Testing, protocolos y extensiones
Workshop iOS 3: Testing, protocolos y extensiones
Visual Engineering
 
Workshop iOS 2: Swift - Structures
Workshop iOS 2: Swift - StructuresWorkshop iOS 2: Swift - Structures
Workshop iOS 2: Swift - Structures
Visual Engineering
 
Workhop iOS 1: Fundamentos de Swift
Workhop iOS 1: Fundamentos de SwiftWorkhop iOS 1: Fundamentos de Swift
Workhop iOS 1: Fundamentos de Swift
Visual Engineering
 
Workshop 26: React Native - The Native Side
Workshop 26: React Native - The Native SideWorkshop 26: React Native - The Native Side
Workshop 26: React Native - The Native Side
Visual Engineering
 
Workshop 25: React Native - Components
Workshop 25: React Native - ComponentsWorkshop 25: React Native - Components
Workshop 25: React Native - Components
Visual Engineering
 
Workshop 24: React Native Introduction
Workshop 24: React Native IntroductionWorkshop 24: React Native Introduction
Workshop 24: React Native Introduction
Visual Engineering
 
Workshop 23: ReactJS, React & Redux testing
Workshop 23: ReactJS, React & Redux testingWorkshop 23: ReactJS, React & Redux testing
Workshop 23: ReactJS, React & Redux testing
Visual Engineering
 
Workshop 22: ReactJS Redux Advanced
Workshop 22: ReactJS Redux AdvancedWorkshop 22: ReactJS Redux Advanced
Workshop 22: ReactJS Redux Advanced
Visual Engineering
 
Workshop 22: React-Redux Middleware
Workshop 22: React-Redux MiddlewareWorkshop 22: React-Redux Middleware
Workshop 22: React-Redux Middleware
Visual Engineering
 
Workshop 20: ReactJS Part II Flux Pattern & Redux
Workshop 20: ReactJS Part II Flux Pattern & ReduxWorkshop 20: ReactJS Part II Flux Pattern & Redux
Workshop 20: ReactJS Part II Flux Pattern & Redux
Visual Engineering
 
Workshop 19: ReactJS Introduction
Workshop 19: ReactJS IntroductionWorkshop 19: ReactJS Introduction
Workshop 19: ReactJS Introduction
Visual Engineering
 
Workshop 14: AngularJS Parte III
Workshop 14: AngularJS Parte IIIWorkshop 14: AngularJS Parte III
Workshop 14: AngularJS Parte III
Visual Engineering
 
Workshop 13: AngularJS Parte II
Workshop 13: AngularJS Parte IIWorkshop 13: AngularJS Parte II
Workshop 13: AngularJS Parte II
Visual Engineering
 
Workshop 8: Templating: Handlebars, DustJS
Workshop 8: Templating: Handlebars, DustJSWorkshop 8: Templating: Handlebars, DustJS
Workshop 8: Templating: Handlebars, DustJS
Visual Engineering
 
Ad

Recently uploaded (20)

Learn the ABC with Bauhaus by Klara Francisco.pdf
Learn the ABC with Bauhaus by Klara Francisco.pdfLearn the ABC with Bauhaus by Klara Francisco.pdf
Learn the ABC with Bauhaus by Klara Francisco.pdf
KlaraJericaFrancisco
 
Beautiful Motherhood (Kal-el's Shows Slideshow)
Beautiful Motherhood (Kal-el's Shows Slideshow)Beautiful Motherhood (Kal-el's Shows Slideshow)
Beautiful Motherhood (Kal-el's Shows Slideshow)
Kal-el's Shows
 
Furniture design for projects-vol-3-brochure.pdf
Furniture design for projects-vol-3-brochure.pdfFurniture design for projects-vol-3-brochure.pdf
Furniture design for projects-vol-3-brochure.pdf
AjayBhonge1
 
EY – The Future of Assurance | How Technology is Transforming the Audit
EY – The Future of Assurance | How Technology is Transforming the AuditEY – The Future of Assurance | How Technology is Transforming the Audit
EY – The Future of Assurance | How Technology is Transforming the Audit
INKPPT
 
APLASTIC ANEMIA presention BY NIAZY.pptx
APLASTIC ANEMIA  presention BY NIAZY.pptxAPLASTIC ANEMIA  presention BY NIAZY.pptx
APLASTIC ANEMIA presention BY NIAZY.pptx
azizurhman200
 
101 Marketing for Design Entrepreneurs.pptx
101 Marketing for Design Entrepreneurs.pptx101 Marketing for Design Entrepreneurs.pptx
101 Marketing for Design Entrepreneurs.pptx
Prof. Hany El-Said
 
soc114-igfiebruvbupibvịbelỉbvch22-2024.pptx
soc114-igfiebruvbupibvịbelỉbvch22-2024.pptxsoc114-igfiebruvbupibvịbelỉbvch22-2024.pptx
soc114-igfiebruvbupibvịbelỉbvch22-2024.pptx
duongvd12c4bc1718
 
We Trust AI... Until We Don’t_ The UX of Comfort Zones by Dan Maccarone and P...
We Trust AI... Until We Don’t_ The UX of Comfort Zones by Dan Maccarone and P...We Trust AI... Until We Don’t_ The UX of Comfort Zones by Dan Maccarone and P...
We Trust AI... Until We Don’t_ The UX of Comfort Zones by Dan Maccarone and P...
UXPA Boston
 
iTools 4.5.1.8 Crack + License Key Free Download [Latest 2025]
iTools 4.5.1.8 Crack + License Key Free Download [Latest 2025]iTools 4.5.1.8 Crack + License Key Free Download [Latest 2025]
iTools 4.5.1.8 Crack + License Key Free Download [Latest 2025]
Web Designer
 
PWC – Workforce of the Future 2030 | Four Scenarios Shaping Tomorrow's Work
PWC – Workforce of the Future 2030 | Four Scenarios Shaping Tomorrow's WorkPWC – Workforce of the Future 2030 | Four Scenarios Shaping Tomorrow's Work
PWC – Workforce of the Future 2030 | Four Scenarios Shaping Tomorrow's Work
INKPPT
 
The Butterfly Effect in Design Entrepreneurship.pptx
The Butterfly Effect in Design Entrepreneurship.pptxThe Butterfly Effect in Design Entrepreneurship.pptx
The Butterfly Effect in Design Entrepreneurship.pptx
Prof. Hany El-Said
 
Top 5 Modern Furniture Pieces Every Home Should Have in 2025
Top 5 Modern Furniture Pieces Every Home Should Have in 2025Top 5 Modern Furniture Pieces Every Home Should Have in 2025
Top 5 Modern Furniture Pieces Every Home Should Have in 2025
designplusgallery
 
Using AI to Streamline Personas and Journey Map Creation
Using AI to Streamline Personas and Journey Map CreationUsing AI to Streamline Personas and Journey Map Creation
Using AI to Streamline Personas and Journey Map Creation
Kyle Soucy
 
CONTENT MARKETING.pdf vfhfhfbdvdfvdfregf
CONTENT MARKETING.pdf vfhfhfbdvdfvdfregfCONTENT MARKETING.pdf vfhfhfbdvdfvdfregf
CONTENT MARKETING.pdf vfhfhfbdvdfvdfregf
bjtjhj
 
Digital Marketing Mock Project - Client Testimonial
Digital Marketing Mock Project - Client TestimonialDigital Marketing Mock Project - Client Testimonial
Digital Marketing Mock Project - Client Testimonial
Adeline Yeo
 
最新版加拿大莱斯桥学院毕业证(Lethbridge毕业证书)原版定制
最新版加拿大莱斯桥学院毕业证(Lethbridge毕业证书)原版定制最新版加拿大莱斯桥学院毕业证(Lethbridge毕业证书)原版定制
最新版加拿大莱斯桥学院毕业证(Lethbridge毕业证书)原版定制
Taqyea
 
Elevating Urban Skylines: The Power of High-Rise Exterior Renderings by Yantr...
Elevating Urban Skylines: The Power of High-Rise Exterior Renderings by Yantr...Elevating Urban Skylines: The Power of High-Rise Exterior Renderings by Yantr...
Elevating Urban Skylines: The Power of High-Rise Exterior Renderings by Yantr...
Yantram Animation Studio Corporation
 
Tempalte Corporate BUsines Promotion news
Tempalte Corporate BUsines Promotion newsTempalte Corporate BUsines Promotion news
Tempalte Corporate BUsines Promotion news
AditiaAfifArfiansyah
 
Presentation1asdghjhgggfhgfghfvbndj.pptx
Presentation1asdghjhgggfhgfghfvbndj.pptxPresentation1asdghjhgggfhgfghfvbndj.pptx
Presentation1asdghjhgggfhgfghfvbndj.pptx
sandeepkushwahag2000
 
‘Everybody is a designer’ revisited: 
A Retrospective on Design’s Power, Posi...
‘Everybody is a designer’ revisited: 
A Retrospective on Design’s Power, Posi...‘Everybody is a designer’ revisited: 
A Retrospective on Design’s Power, Posi...
‘Everybody is a designer’ revisited: 
A Retrospective on Design’s Power, Posi...
Lou Susi
 
Learn the ABC with Bauhaus by Klara Francisco.pdf
Learn the ABC with Bauhaus by Klara Francisco.pdfLearn the ABC with Bauhaus by Klara Francisco.pdf
Learn the ABC with Bauhaus by Klara Francisco.pdf
KlaraJericaFrancisco
 
Beautiful Motherhood (Kal-el's Shows Slideshow)
Beautiful Motherhood (Kal-el's Shows Slideshow)Beautiful Motherhood (Kal-el's Shows Slideshow)
Beautiful Motherhood (Kal-el's Shows Slideshow)
Kal-el's Shows
 
Furniture design for projects-vol-3-brochure.pdf
Furniture design for projects-vol-3-brochure.pdfFurniture design for projects-vol-3-brochure.pdf
Furniture design for projects-vol-3-brochure.pdf
AjayBhonge1
 
EY – The Future of Assurance | How Technology is Transforming the Audit
EY – The Future of Assurance | How Technology is Transforming the AuditEY – The Future of Assurance | How Technology is Transforming the Audit
EY – The Future of Assurance | How Technology is Transforming the Audit
INKPPT
 
APLASTIC ANEMIA presention BY NIAZY.pptx
APLASTIC ANEMIA  presention BY NIAZY.pptxAPLASTIC ANEMIA  presention BY NIAZY.pptx
APLASTIC ANEMIA presention BY NIAZY.pptx
azizurhman200
 
101 Marketing for Design Entrepreneurs.pptx
101 Marketing for Design Entrepreneurs.pptx101 Marketing for Design Entrepreneurs.pptx
101 Marketing for Design Entrepreneurs.pptx
Prof. Hany El-Said
 
soc114-igfiebruvbupibvịbelỉbvch22-2024.pptx
soc114-igfiebruvbupibvịbelỉbvch22-2024.pptxsoc114-igfiebruvbupibvịbelỉbvch22-2024.pptx
soc114-igfiebruvbupibvịbelỉbvch22-2024.pptx
duongvd12c4bc1718
 
We Trust AI... Until We Don’t_ The UX of Comfort Zones by Dan Maccarone and P...
We Trust AI... Until We Don’t_ The UX of Comfort Zones by Dan Maccarone and P...We Trust AI... Until We Don’t_ The UX of Comfort Zones by Dan Maccarone and P...
We Trust AI... Until We Don’t_ The UX of Comfort Zones by Dan Maccarone and P...
UXPA Boston
 
iTools 4.5.1.8 Crack + License Key Free Download [Latest 2025]
iTools 4.5.1.8 Crack + License Key Free Download [Latest 2025]iTools 4.5.1.8 Crack + License Key Free Download [Latest 2025]
iTools 4.5.1.8 Crack + License Key Free Download [Latest 2025]
Web Designer
 
PWC – Workforce of the Future 2030 | Four Scenarios Shaping Tomorrow's Work
PWC – Workforce of the Future 2030 | Four Scenarios Shaping Tomorrow's WorkPWC – Workforce of the Future 2030 | Four Scenarios Shaping Tomorrow's Work
PWC – Workforce of the Future 2030 | Four Scenarios Shaping Tomorrow's Work
INKPPT
 
The Butterfly Effect in Design Entrepreneurship.pptx
The Butterfly Effect in Design Entrepreneurship.pptxThe Butterfly Effect in Design Entrepreneurship.pptx
The Butterfly Effect in Design Entrepreneurship.pptx
Prof. Hany El-Said
 
Top 5 Modern Furniture Pieces Every Home Should Have in 2025
Top 5 Modern Furniture Pieces Every Home Should Have in 2025Top 5 Modern Furniture Pieces Every Home Should Have in 2025
Top 5 Modern Furniture Pieces Every Home Should Have in 2025
designplusgallery
 
Using AI to Streamline Personas and Journey Map Creation
Using AI to Streamline Personas and Journey Map CreationUsing AI to Streamline Personas and Journey Map Creation
Using AI to Streamline Personas and Journey Map Creation
Kyle Soucy
 
CONTENT MARKETING.pdf vfhfhfbdvdfvdfregf
CONTENT MARKETING.pdf vfhfhfbdvdfvdfregfCONTENT MARKETING.pdf vfhfhfbdvdfvdfregf
CONTENT MARKETING.pdf vfhfhfbdvdfvdfregf
bjtjhj
 
Digital Marketing Mock Project - Client Testimonial
Digital Marketing Mock Project - Client TestimonialDigital Marketing Mock Project - Client Testimonial
Digital Marketing Mock Project - Client Testimonial
Adeline Yeo
 
最新版加拿大莱斯桥学院毕业证(Lethbridge毕业证书)原版定制
最新版加拿大莱斯桥学院毕业证(Lethbridge毕业证书)原版定制最新版加拿大莱斯桥学院毕业证(Lethbridge毕业证书)原版定制
最新版加拿大莱斯桥学院毕业证(Lethbridge毕业证书)原版定制
Taqyea
 
Elevating Urban Skylines: The Power of High-Rise Exterior Renderings by Yantr...
Elevating Urban Skylines: The Power of High-Rise Exterior Renderings by Yantr...Elevating Urban Skylines: The Power of High-Rise Exterior Renderings by Yantr...
Elevating Urban Skylines: The Power of High-Rise Exterior Renderings by Yantr...
Yantram Animation Studio Corporation
 
Tempalte Corporate BUsines Promotion news
Tempalte Corporate BUsines Promotion newsTempalte Corporate BUsines Promotion news
Tempalte Corporate BUsines Promotion news
AditiaAfifArfiansyah
 
Presentation1asdghjhgggfhgfghfvbndj.pptx
Presentation1asdghjhgggfhgfghfvbndj.pptxPresentation1asdghjhgggfhgfghfvbndj.pptx
Presentation1asdghjhgggfhgfghfvbndj.pptx
sandeepkushwahag2000
 
‘Everybody is a designer’ revisited: 
A Retrospective on Design’s Power, Posi...
‘Everybody is a designer’ revisited: 
A Retrospective on Design’s Power, Posi...‘Everybody is a designer’ revisited: 
A Retrospective on Design’s Power, Posi...
‘Everybody is a designer’ revisited: 
A Retrospective on Design’s Power, Posi...
Lou Susi
 

Workshop 18: CSS Animations & cool effects

  • 1. Front End Workshops CSS Animations & cool effects Toni Camí & Jorge López jlopez@visual-engin.com tcami@visual-engin.com
  • 5. CSS Transitions allows property changes in CSS properties to occur smoothly over a specified duration.
  • 6. Transition-duration: Specifies the duration over which transitions should occur. You can specify a single duration that applies to all properties during the transition, or multiple values to allow each property to transition over a different period of time. Transition-property: Specifies the name or names of the CSS properties to which transitions should be applied. Transition-delay: Defines how long to wait between the time a property is changed and the transition actually begins. Transition-timing-function: Specifies a function to define how intermediate values for properties are computed. Timing functions determine how intermediate values of the transition are calculated. Most timing functions can be specified by providing the graph of the corresponding function, as defined by four points defining a cubic bezier. Easyng website
  • 10. CSS Transform property allow you to visually manipulate an element by skewing, rotating, translating or scaling.
  • 11. scale: affects the size of the element. This also applies to the font-size, padding, height, and width of an element, too. skewX and skewY: tilts an element to the left or right, like turning a triangle into a parallelogram. There is no shorthand skew property. translate: moves an element sideways or up and down. rotate: rotates the element clockwise from its current position. Transformations-properties CSS
  • 13. CSS animations make it possible to animate transitions from one CSS style configuration to another. Animations consist of two components, a style describing the CSS animation and a set of keyframes that indicate the start and end states of the animation's style, as well as possible intermediate waypoints. Advantages: 1. No JS is required. 2. Animations run well, rendering… 3. The browser optimize performance and efficiency. For example, reducing the update frequency of animations running in tabs that aren't currently visible.
  • 14. animation-delay Configures the delay between the time the element is loaded and the beginning of the animation sequence. animation-direction Configures whether or not the animation should alternate direction on each run through the sequence or reset to the start point and repeat itself. animation-duration Configures the length of time that an animation should take to complete one cycle. animation-iteration-count Configures the number of times the animation should repeat; you can specify infinite to repeat the animation indefinitely. animation-name Specifies the name of the @keyframes at-rule describing the animation's keyframes.
  • 15. animation-play-state Lets you pause and resume the animation sequence. animation-timing-function Configures the timing of the animation; that is, how the animation transitions through keyframes, by establishing acceleration curves. animation-fill-mode Configures what values are applied by the animation before and after it is executing. Animation-properties CSS
  • 17. Keyframes are used to specify the values for the animating properties at various points during the animation. @keyframes identifier (which will be referenced using animation-name: identifier) { CSS style rules }
  • 18. ● Keyframes use a <percentage> to indicate the time during the animation sequence at which they take place. ● 0% Start / 100% End. ● These two times are so important, they have special aliases: from and to. ● No negative ● No higher than 100%; ● You can optionally include additional keyframes that describe intermediate steps between the start and end of the animation.
  • 19. Hover
  • 21. .trigger { position: relative; background: #444; width: 120px; height: 120px; border: none; border-radius: 50%; /* img replace */ overflow: hidden; text-indent: 100%; color: transparent; white-space: nowrap; cursor: pointer; } .trigger span, .trigger span::before, .trigger span::after { position: absolute; width: 44px; height: 4px; background: white; border-radius: 4px; } .trigger span { top: calc(50% - 2px); left: calc(50% - 22px); transition: transform .3s; } .trigger span::before, .trigger span::after { content: ''; left: 0; transition: transform .3s, width .3s; } .trigger span::before { bottom: 12px; } .trigger span::after { top: 12px; } .trigger:hover span { transform: rotate(180deg); } .trigger:hover span::before { width: 50%; transform: translateX(-2px) translateY(5px) rotate(-45deg); } .trigger:hover span::after { width: 50%; transform: translateX(-2px) translateY(-5 px) rotate(45deg); }
  • 23. Example http://dev2.slicejack.com/fullscreen-video-demo/index.html <div class="fullscreen-bg"> <video loop muted autoplay poster="img/videoframe.jpg" class="fullscreen-bg__video"> <source src="video/big_buck_bunny.webm" type="video/webm"> <source src="video/big_buck_bunny.mp4" type="video/mp4"> <source src="video/big_buck_bunny.ogv" type="video/ogg"> </video> </div>
  • 24. .fullscreen-bg { position: fixed; top: 0; right: 0; bottom: 0; left: 0; overflow: hidden; z-index: -100; } .fullscreen-bg__video { position: absolute; top: 0; left: 0; width: 100%; height: 100%; } @media (min-aspect-ratio: 16/9) { .fullscreen-bg__video { height: 300%; top: -100%; } } @media (max-aspect-ratio: 16/9) { .fullscreen-bg__video { width: 300%; left: -100%; } } @media (max-width: 767px) { .fullscreen-bg { background: url('../img/videoframe.jpg') center center / cover no-repeat; } .fullscreen-bg__video { display: none; } } CSS
  • 26. Speed, movement & position. Elements behavior depends on the scroll. You can add to Backgrounds, divs or sprites. ONLY CSS WITH JS Example http://jonathannicol.com/projects/parallax-scrolling/ Example download
  • 27. <section id="home" data-type="background" data-speed="10" class="pages"> <article>I am absolute positioned</article> </section> <section id="about" data-type="background" data-speed="10" class="pages"> <article>Simple Parallax Scroll</article> </section> #about { background: url(about-bg.jpg) 50% 0 repeat fixed; min-height: 1000px; height: 1000px; margin: 0 auto; width: 100%; max-width: 1920px; position: relative; -webkit-box-shadow: 0 0 50px rgba(0,0,0,0.8); box-shadow: 0 0 50px rgba(0,0,0,0.8); } #about article { height: 458px; position: absolute; text-align: center; top: 150px; width: 100%; } #home { background: url(home-bg.jpg) 50% 0 repeat fixed; min-height: 1000px; height: 1000px; margin: 0 auto; width: 100%; max-width: 1920px; position: relative; } #home article { height: 458px; position: absolute; text-align: center; top: 150px; width: 100%; }
  • 28. <div id="parallax-bg3"> <img id="bg3-1" src="img/balloon.png" width="529" height="757" alt="Montgolfier hot air balloon"/> <img id="bg3-2" src="img/balloon2.png" width="603" height="583" alt="Frameless parachute"/> <img id="bg3-3" src="img/balloon3.png" width="446" height="713" alt="Blanchard's air balloon"/> <img id="bg3-4" src="img/ground.png" width="1104" height="684" alt="Landscape with trees and cows"/> </div> <!-- Parallax midground clouds --> <div id="parallax-bg2"> <img id="bg2-1" src="img/cloud-lg1.png" alt="cloud"/> <img id="bg2-2" src="img/cloud-lg1.png" alt="cloud"/> <img id="bg2-3" src="img/cloud-lg1.png" alt="cloud"/> <img id="bg2-4" src="img/cloud-lg1.png" alt="cloud"/> <img id="bg2-5" src="img/cloud-lg1.png" alt="cloud"/> </div> <!-- Parallax background clouds --> <div id="parallax-bg1"> <img id="bg1-1" src="img/cloud-lg2.png" alt="cloud"/> <img id="bg1-2" src="img/cloud-lg2.png" alt="cloud"/> <img id="bg1-3" src="img/cloud-lg2.png" alt="cloud"/> <img id="bg1-4" src="img/cloud-lg2.png" alt="cloud"/> </div>
  • 29. CSS #parallax-bg3 { z-index: 3; position: fixed; left: 50%; /* align left edge with center of viewport */ top: 0; width: 940px; margin-left: -470px; /* move left by half element's width */ } #bg3-1 { position: absolute; top: -111px; left: 355px; } #bg3-2 { position: absolute; top: 812px; left: 321px; } JAVASCRIPT function parallaxScroll(){ var scrolled = $(window).scrollTop(); $('#parallax-bg1').css('top',(0-(scrolled*.25))+'px'); $('#parallax-bg2').css('top',(0-(scrolled*.5))+'px'); $('#parallax-bg3').css('top',(0-(scrolled*.75))+'px'); }
  • 33. - Example 2 Loaders: http://callmenick.com/_development/css-loaders-and- spinners-2/ - Slack-CSS-Logo-master -> http://callmenick.com/_development/slack- logo/ Un curso interesante para iniciarse en Animaciones con CSS: https://codyhouse.co/course/mastering-css-transitions-transformations- animations/
  • 34. Thanks for your time! :)