SlideShare una empresa de Scribd logo
1 de 23
CSS
ANIMATION
Jaja
Why we need animation?
Boring Interestin
g
http://www.uisdc.com/login-screen-design-flow
More surprise
We should
know the
basic syntax
• CSS3 2DTransforms
• CSS3 3DTransforms
CSS3 2D
Transforms
CSS3 transforms allow you to translate, rotate, scale, and
skew elements
http://www.w3schools.com/css
CSS3 3D Transforms ?
Just add Z -axis
http://www.w3schools.com/css
It’s easy to compare 2D and 3D
http://tinyurl.com/obdrnq2
Example
translate
div {
width: 300px;
height: 100px;
background-color: yellow;
border: 1px solid black;
-ms-transform: translate(50px,100px); /* IE 9 */
-webkit-transform: translate(50px,100px); /* Safari */
transform: translate(50px,100px); /* Standard syntax */
}
(0,0)
http://www.w3schools.com/css
Example
rotate
div {
width: 300px;
height: 100px;
background-color: yellow;
border: 1px solid black;
}
div#myDiv {
-ms-transform: rotate(20deg); /* IE 9 */
-webkit-transform: rotate(20deg); /* Safari */
transform: rotate(20deg); /* Standard syntax */
}
http://www.w3schools.com/css
Now?
http://tinyurl.com/oheqrzw
A easy
animation
example
• Just add “transition” in your CSS style
div {
width: 300px;
height: 100px;
background-color: yellow;
border: 1px solid black;
-webkit-transition: transform 1s; /* Safari */
transition: transform 1s;
}
div:hover{
-ms-transform: translate(50px,100px); /* IE 9 */
-webkit-transform: translate(50px,100px); /* Safari */
transform: translate(50px,100px); /* Standard syntax */
}
http://www.w3schools.com/css
Two way
make your
animation
• CSS3Transitions
• CSS3 Animations
CSS3
Transitions
To create a transition effect, you must specify two things:
• The CSS property you want to add an effect to
• The duration of the effect
-webkit-transition: transform 1s; /* Safari */
transition: transform 1s;
Previously example
http://www.w3schools.com/css
Effect propertyEffect duration
CSS3
Animations
• You specify CSS styles inside the @keyframes rule, the
animation will gradually change from the current style
to the new style at certain times
/*The animation code */
@keyframes example {
from {background-color: red;}
to {background-color: yellow;}
}
/*The element to apply the animation to */
div {
width: 100px;
height: 100px;
background-color: red;
animation-name: example;
animation-duration: 4s;
}
http://www.w3schools.com/css
You can
specify
every frame
/*The animation code */
@keyframes example {
0% {background-color: red; left:0px; top:0px;}
25% {background-color: yellow; left:200px; top:0px;}
50% {background-color: blue; left:200px; top:200px;}
75% {background-color: green; left:0px; top:200px;}
100% {background-color: red; left:0px; top:0px;}
}
/*The element to apply the animation to */
div {
width: 100px;
height: 100px;
position: relative;
background-color: red;
animation-name: example;
animation-duration: 4s;
}
http://www.w3schools.com/css
Let’s
compare
CSS3 AnimationsCSS3 Transitions
http://tinyurl.com/oa4md7e http://tinyurl.com/pdhdbsj
Just choose one of your love
http://tinyurl.com/p35wuvx http://tinyurl.com/qhkmbr3 http://tinyurl.com/nhkkxa4
Of course you can use framework
http://tinyurl.com/ppx9cf8
Animate.css
https://daneden.github.io/animate.css/
Let’s join the animation of world
http://tinyurl.com/pwfmyuy

Más contenido relacionado

La actualidad más candente

La actualidad más candente (20)

Page layout with css
Page layout with cssPage layout with css
Page layout with css
 
An Overview of HTML, CSS & Java Script
An Overview of HTML, CSS & Java ScriptAn Overview of HTML, CSS & Java Script
An Overview of HTML, CSS & Java Script
 
CSS Animations & Transitions
CSS Animations & TransitionsCSS Animations & Transitions
CSS Animations & Transitions
 
jQuery for beginners
jQuery for beginnersjQuery for beginners
jQuery for beginners
 
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
 
Intro to Flexbox - A Magical CSS Property
Intro to Flexbox - A Magical CSS PropertyIntro to Flexbox - A Magical CSS Property
Intro to Flexbox - A Magical CSS Property
 
Advanced Cascading Style Sheets
Advanced Cascading Style SheetsAdvanced Cascading Style Sheets
Advanced Cascading Style Sheets
 
Css lecture notes
Css lecture notesCss lecture notes
Css lecture notes
 
Bootstrap Framework
Bootstrap Framework Bootstrap Framework
Bootstrap Framework
 
Html table
Html tableHtml table
Html table
 
Css position
Css positionCss position
Css position
 
Introduction to HTML and CSS
Introduction to HTML and CSSIntroduction to HTML and CSS
Introduction to HTML and CSS
 
CSS3, Media Queries, and Responsive Design
CSS3, Media Queries, and Responsive DesignCSS3, Media Queries, and Responsive Design
CSS3, Media Queries, and Responsive Design
 
Presentation of bootstrap
Presentation of bootstrapPresentation of bootstrap
Presentation of bootstrap
 
cascading style sheet ppt
cascading style sheet pptcascading style sheet ppt
cascading style sheet ppt
 
Css box-model
Css box-modelCss box-model
Css box-model
 
html5.ppt
html5.ppthtml5.ppt
html5.ppt
 
Introduction to HTML5
Introduction to HTML5Introduction to HTML5
Introduction to HTML5
 
Html5 tutorial for beginners
Html5 tutorial for beginnersHtml5 tutorial for beginners
Html5 tutorial for beginners
 
HTML5
HTML5HTML5
HTML5
 

Destacado

JS.Chi CSS Animations
JS.Chi CSS AnimationsJS.Chi CSS Animations
JS.Chi CSS Animations
Justin Meyer
 
Computer networking short_questions_and_answers
Computer networking short_questions_and_answersComputer networking short_questions_and_answers
Computer networking short_questions_and_answers
Tarun Thakur
 
The Box Model
The Box ModelThe Box Model
The Box Model
sdireland
 

Destacado (20)

Css3animation
Css3animationCss3animation
Css3animation
 
Honey con 2014
Honey con 2014Honey con 2014
Honey con 2014
 
CSS3 filterとtransformをtransition, animationでアニメーション
CSS3 filterとtransformをtransition, animationでアニメーションCSS3 filterとtransformをtransition, animationでアニメーション
CSS3 filterとtransformをtransition, animationでアニメーション
 
Media Query
Media QueryMedia Query
Media Query
 
Ad 8
Ad 8Ad 8
Ad 8
 
JS.Chi CSS Animations
JS.Chi CSS AnimationsJS.Chi CSS Animations
JS.Chi CSS Animations
 
The Future is now! Flexbox und fancy Stuff im Responsive Webdesign
The Future is now! Flexbox und fancy Stuff im Responsive WebdesignThe Future is now! Flexbox und fancy Stuff im Responsive Webdesign
The Future is now! Flexbox und fancy Stuff im Responsive Webdesign
 
Computer networking short_questions_and_answers
Computer networking short_questions_and_answersComputer networking short_questions_and_answers
Computer networking short_questions_and_answers
 
Understanding flexbox
Understanding flexboxUnderstanding flexbox
Understanding flexbox
 
Floating
FloatingFloating
Floating
 
The Box Model
The Box ModelThe Box Model
The Box Model
 
Understanding the flex layout
Understanding the flex layoutUnderstanding the flex layout
Understanding the flex layout
 
Intro to OOCSS Workshop
Intro to OOCSS WorkshopIntro to OOCSS Workshop
Intro to OOCSS Workshop
 
Elements of Computer Networking: An Integrated Approach (Concepts, Problems a...
Elements of Computer Networking: An Integrated Approach (Concepts, Problems a...Elements of Computer Networking: An Integrated Approach (Concepts, Problems a...
Elements of Computer Networking: An Integrated Approach (Concepts, Problems a...
 
Cascading Style Sheets - Part 02
Cascading Style Sheets - Part 02Cascading Style Sheets - Part 02
Cascading Style Sheets - Part 02
 
Css floats
Css floatsCss floats
Css floats
 
Css positioning
Css positioningCss positioning
Css positioning
 
CSS Layouting #4 : Float
CSS Layouting #4 : FloatCSS Layouting #4 : Float
CSS Layouting #4 : Float
 
Creating Beautiful CSS3 Animations - FITC Amsterdam 2016
Creating Beautiful CSS3 Animations - FITC Amsterdam 2016Creating Beautiful CSS3 Animations - FITC Amsterdam 2016
Creating Beautiful CSS3 Animations - FITC Amsterdam 2016
 
Efficient, maintainable CSS
Efficient, maintainable CSSEfficient, maintainable CSS
Efficient, maintainable CSS
 

Similar a Css animation

New Elements & Features in CSS3
New Elements & Features in CSS3New Elements & Features in CSS3
New Elements & Features in CSS3
Jamshid Hashimi
 
HTML5 and CSS3 – exploring mobile possibilities - Dynabyte event
HTML5 and CSS3 – exploring mobile possibilities - Dynabyte eventHTML5 and CSS3 – exploring mobile possibilities - Dynabyte event
HTML5 and CSS3 – exploring mobile possibilities - Dynabyte event
Robert Nyman
 
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
 

Similar a Css animation (20)

New Elements & Features in CSS3
New Elements & Features in CSS3New Elements & Features in CSS3
New Elements & Features in CSS3
 
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?
 
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
 
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
 
CSS3
CSS3CSS3
CSS3
 
HTML5 and CSS3 – exploring mobile possibilities - Dynabyte event
HTML5 and CSS3 – exploring mobile possibilities - Dynabyte eventHTML5 and CSS3 – exploring mobile possibilities - Dynabyte event
HTML5 and CSS3 – exploring mobile possibilities - Dynabyte event
 
PreDevCampSF - CSS3 Tricks
PreDevCampSF - CSS3 TricksPreDevCampSF - CSS3 Tricks
PreDevCampSF - CSS3 Tricks
 
Workshop 18: CSS Animations & cool effects
Workshop 18: CSS Animations & cool effectsWorkshop 18: CSS Animations & cool effects
Workshop 18: CSS Animations & cool effects
 
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
 
Css3
Css3Css3
Css3
 
Sass compass
Sass compassSass compass
Sass compass
 
CSS3 Animations
CSS3 AnimationsCSS3 Animations
CSS3 Animations
 
CSS and CSS3
CSS and CSS3CSS and CSS3
CSS and CSS3
 
Designing Your Next Generation Web Pages with CSS3
Designing Your Next Generation Web Pages with CSS3Designing Your Next Generation Web Pages with CSS3
Designing Your Next Generation Web Pages with CSS3
 
Html5
Html5Html5
Html5
 
Basics of html5, data_storage, css3
Basics of html5, data_storage, css3Basics of html5, data_storage, css3
Basics of html5, data_storage, css3
 
SVG introduction
SVG   introductionSVG   introduction
SVG introduction
 
Css3
Css3Css3
Css3
 
Css3 101
Css3 101Css3 101
Css3 101
 
Mastering CSS Animations
Mastering CSS AnimationsMastering CSS Animations
Mastering CSS Animations
 

Más de Aaron King

Más de Aaron King (14)

Golang start and tips
Golang start and tipsGolang start and tips
Golang start and tips
 
Jenkins vs gogs
Jenkins vs gogsJenkins vs gogs
Jenkins vs gogs
 
Database index(sql server)
Database index(sql server)Database index(sql server)
Database index(sql server)
 
第一次Elasticsearch就上手
第一次Elasticsearch就上手第一次Elasticsearch就上手
第一次Elasticsearch就上手
 
Running with emmet and scss
Running with emmet  and scssRunning with emmet  and scss
Running with emmet and scss
 
How do i imagine my site
How do i imagine my siteHow do i imagine my site
How do i imagine my site
 
網頁三本柱最終章Javascript與jquery
網頁三本柱最終章Javascript與jquery網頁三本柱最終章Javascript與jquery
網頁三本柱最終章Javascript與jquery
 
那些年網頁Ps切板的小事
那些年網頁Ps切板的小事那些年網頁Ps切板的小事
那些年網頁Ps切板的小事
 
網頁三本柱之Html與css
網頁三本柱之Html與css網頁三本柱之Html與css
網頁三本柱之Html與css
 
我的第一個Git版控
我的第一個Git版控我的第一個Git版控
我的第一個Git版控
 
3分鐘Azure search自我介紹 ( 3 min talking about Azure Search)
3分鐘Azure search自我介紹 ( 3 min talking about Azure Search)3分鐘Azure search自我介紹 ( 3 min talking about Azure Search)
3分鐘Azure search自我介紹 ( 3 min talking about Azure Search)
 
網頁基礎介紹
網頁基礎介紹網頁基礎介紹
網頁基礎介紹
 
Rails gril
Rails grilRails gril
Rails gril
 
Security.pptx [repaired]
Security.pptx [repaired]Security.pptx [repaired]
Security.pptx [repaired]
 

Css animation

Notas del editor

  1. Google : zerg rush