SlideShare a Scribd company logo
1 of 36
Ashu Tomar
ashu@knoldus.com
CSS3
Cascading Style Sheets
Agenda
1. Importance of CSS
2. CSS Definition
3. CSS3 Combinators
4. CSS3 Transforms
5. CSS3 Transitions
6. CSS3 Animations
7. Demo without JS
8. Demo with JS()
Importance of CSS
A simple web page without using CSS
Same web page using CSS
CSS Definition
Design is not just something designers do.
Design is marketing.
Cascading Style Sheets (CSS) primary
language used to describe look and formatting
for webpages across the Internet and
documents of markup in general.
Use CSS to define styles for your documents,
including the design, layout and variations in
display for different devices and screen sizes.
CSS syntax
CSS Combinators
There are four different combinators in CSS3:
1. Descendant selector
2. Child selector
3. Adjacent sibling selector
4. General sibling selector
1. Descendant selector
The descendant selector matches all elements that are
descendants of a specified element.
<head>
<style>
div p {
background-color: skyblue;
}
</style>
</head>
<body>
<div>
<p>Paragraph 1.</p>
<p>Paragraph 2.</p>
<span><p>Paragraph 3.</p></span>
</div>
<p>Paragraph 4. </p>
<p>Paragraph 5. </p>
</body>
2. Child selector
The child selector selects all elements that are the immediate
children of a specified element.
<head>
<style>
div > p {
background-color: skyblue;
}
</style>
</head>
<body>
<div>
<p>Paragraph 1.</p>
<p>Paragraph 2.</p>
<p>Paragraph 2.</p>
<span><p>Paragraph 3.</p></span>
</div>
<p>Paragraph 4. </p>
<p>Paragraph 5. </p>
</body>
Result
3. Adjacent Sibling Selector
The adjacent sibling selector selects all elements that
are the adjacent siblings of a specified element.
Sibling elements must have the same parent element,
and "adjacent" means "immediately following".
Result
Result
4. General Sibling Selector
The general sibling selector selects all elements that are siblings
of a specified element.
<head>
<style>
div ~ p {
background-color: skyblue;
}
</style>
</head>
<body>
<div>
<p>Paragraph 1.</p>
<p>Paragraph 2.</p>
</div>
<p>Paragraph 3.</p>
<p>Paragraph 4.</p>
</body>
Result
CSS3 Transforms
A transformation is an effect that lets an element change shape,
size and position.
CSS3 transforms allow you to translate, rotate, scale, and skew
elements.
CSS3 supports 2D and 3D transformations.
CSS3 2D Transforms
2D transformation methods:
– translate()
– rotate()
– scale()
– skewX()
– skewY()
The translate() Method
The translate() method moves an element from its current position
(according to the parameters given for the X-axis and the Y-axis).
<head>
<style>
div {
width: 300px;
height: 100px;
background-color: skyblue;
border: 1px solid black;
-ms-transform: translate(150px,100px);
-webkit-transform: translate(150px,100px);
transform: translate(150px,100px);
}
</style>
</head>
<body>
<div>
The translate() method moves an element from
its current position. This div element is moved
50 pixels to the right, and 100 pixels down from
its current position.
</div>
</body>
The rotate() Method
The rotate() method rotates an element clockwise or counter-
clockwise according to a given degree.
–
The scale() Method
The scale() method increases or decreases the size of an element
(according to the parameters given for the width and height).
The skewX() & skewY() Method
The skewX() and SkewY() method skews an element along the X-axis or
Y-axis by the given angle.
These property tilts an element to the left or right, like turning a triangle into
a parallelogram. There is no shorthand skew property.
email
For entering email addresses, and hints that the @ should be shown on the keyboard by default. You can add the multiple attribute if more than one email address will be provided.
email
For entering email addresses, and hints that the @ should be shown on the keyboard by default. You can add the multiple attribute if more than one email address will be provided.
div{
-ms-transform: skewX(20deg);
-webkit-transform: skewX(20deg);
transform: skewX(20deg);
}
div {
-ms-transform: skewY(20deg);
-webkit-transform: skewY(20deg);
transform: skewY(20deg);
}
Browser Support for 2D Transforms
CSS3 Transitions
CSS3 transitions allows you to change property values
smoothly (from one value to another), over a given duration.
The following lists all the transition properties:
Property Description
transition : A shorthand property for setting the
four transition properties into a
single property.
transition-delay : Specifies a delay (in seconds) for the
transition effect.
transition-duration : Specifies how many seconds or
milliseconds a transition effect takes to
complete
transition-property : Specifies the name of the CSS property
the transition effect is for
transition-timing-function: Specifies the speed curve of the transition
effect
The transition-timing-function property can have the
following values:
• ease - specifies a transition effect with a slow start, then fast,
then end slowly (this is default)
• linear - specifies a transition effect with the same speed from
start to end
• ease-in - specifies a transition effect with a slow start
• ease-out - specifies a transition effect with a slow end
• ease-in-out - specifies a transition effect with a slow start and
end
CSS3 Animations
An animation lets an element gradually change from one style to
another.
You can change as many CSS properties you want, as many
times you want.
To use CSS3 animation, you must first specify some keyframes
for the animation.
Keyframes hold what styles the element will have at certain times.
The @keyframes Rule
When you specify CSS styles inside the @keyframes rule,
the animation will gradually change from the current style
to the new style at certain times.
To get an animation to work, you must bind the animation
to an element.
The following table lists the @keyframes rule and all the
animation properties:
Property Description
@keyframes Specifies the animation code
animation A shorthand property for setting
all the animation properties
animation-delay Specifies a delay for the start of an
animation
animation-direction Specifies whether an animation
should play in reverse direction or
alternate cycles
animation-duration Specifies how many seconds or
milliseconds an animation takes to
complete one cycle
animation-iteration-count Specifies the number of times an
animation should be played
animation-name Specifies the name of the @keyframes
animation
Browser Support for Animations
Thanks

More Related Content

What's hot

Website trends 2012 presentation
Website trends 2012 presentationWebsite trends 2012 presentation
Website trends 2012 presentation
Fresh_Egg
 
Web programming css
Web programming cssWeb programming css
Web programming css
Uma mohan
 

What's hot (20)

The Dark Arts of CSS
The Dark Arts of CSSThe Dark Arts of CSS
The Dark Arts of CSS
 
Website trends 2012 presentation
Website trends 2012 presentationWebsite trends 2012 presentation
Website trends 2012 presentation
 
CSS 3
CSS 3CSS 3
CSS 3
 
From Shabby to Chic
From Shabby to ChicFrom Shabby to Chic
From Shabby to Chic
 
Cascading Style Sheets (CSS)
Cascading Style Sheets (CSS)Cascading Style Sheets (CSS)
Cascading Style Sheets (CSS)
 
Introduction to CSS
Introduction to CSSIntroduction to CSS
Introduction to CSS
 
Html & Css presentation
Html  & Css presentation Html  & Css presentation
Html & Css presentation
 
Cordova training - Day 2 Introduction to CSS 3
Cordova training - Day 2 Introduction to CSS 3Cordova training - Day 2 Introduction to CSS 3
Cordova training - Day 2 Introduction to CSS 3
 
SMACSS Workshop
SMACSS WorkshopSMACSS Workshop
SMACSS Workshop
 
Intro to CSS
Intro to CSSIntro to CSS
Intro to CSS
 
Cordova training - Day 3 : Advanced CSS 3
Cordova training - Day 3 : Advanced CSS 3Cordova training - Day 3 : Advanced CSS 3
Cordova training - Day 3 : Advanced CSS 3
 
Intro to HTML + CSS
Intro to HTML + CSSIntro to HTML + CSS
Intro to HTML + CSS
 
Cascading style sheets (CSS)
Cascading style sheets (CSS)Cascading style sheets (CSS)
Cascading style sheets (CSS)
 
HTML5 for ASP.NET Developers
HTML5 for ASP.NET DevelopersHTML5 for ASP.NET Developers
HTML5 for ASP.NET Developers
 
Welcome to css!
Welcome to css!Welcome to css!
Welcome to css!
 
Web programming css
Web programming cssWeb programming css
Web programming css
 
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
 
Intro to html, css & sass
Intro to html, css & sassIntro to html, css & sass
Intro to html, css & sass
 
CSS Selectors: element, class, id
CSS  Selectors: element, class, idCSS  Selectors: element, class, id
CSS Selectors: element, class, id
 
Background property in css
Background property in cssBackground property in css
Background property in css
 

Similar to Css3

CSS3 TTA (Transform Transition Animation)
CSS3 TTA (Transform Transition Animation)CSS3 TTA (Transform Transition Animation)
CSS3 TTA (Transform Transition Animation)
창석 한
 
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 to Css3 (20)

Workshop 18: CSS Animations & cool effects
Workshop 18: CSS Animations & cool effectsWorkshop 18: CSS Animations & cool effects
Workshop 18: CSS Animations & cool effects
 
MTA managing the graphical interface by using css
MTA managing the graphical interface by using cssMTA managing the graphical interface by using css
MTA managing the graphical interface by using css
 
CSS3 basics for beginners - Imrokraft
CSS3 basics for beginners - ImrokraftCSS3 basics for beginners - Imrokraft
CSS3 basics for beginners - Imrokraft
 
CSS3 TTA (Transform Transition Animation)
CSS3 TTA (Transform Transition Animation)CSS3 TTA (Transform Transition Animation)
CSS3 TTA (Transform Transition Animation)
 
CSS3 Animation for beginners - Imrokraft
CSS3 Animation for beginners - ImrokraftCSS3 Animation for beginners - Imrokraft
CSS3 Animation for beginners - Imrokraft
 
CSS3 PPT.pptx
CSS3 PPT.pptxCSS3 PPT.pptx
CSS3 PPT.pptx
 
SVG, CSS3, and D3 for Beginners
SVG, CSS3, and D3 for BeginnersSVG, CSS3, and D3 for Beginners
SVG, CSS3, and D3 for Beginners
 
slides-students-C04.pdf
slides-students-C04.pdfslides-students-C04.pdf
slides-students-C04.pdf
 
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
 
Css animation
Css animationCss animation
Css animation
 
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
 
CSS
CSS CSS
CSS
 
Css3
Css3Css3
Css3
 
html5_css3
html5_css3html5_css3
html5_css3
 
Unit-3-CSS-BWT.pptx
Unit-3-CSS-BWT.pptxUnit-3-CSS-BWT.pptx
Unit-3-CSS-BWT.pptx
 
Srijan presentation on CSS
Srijan presentation on CSSSrijan presentation on CSS
Srijan presentation on CSS
 
SVGD3Angular2React
SVGD3Angular2ReactSVGD3Angular2React
SVGD3Angular2React
 
CSS Walktrough Internship Course
CSS Walktrough Internship CourseCSS Walktrough Internship Course
CSS Walktrough Internship Course
 
ADVANCE CSS STYDY COURSE TO BECOME A PROFESSIONAL.docx
ADVANCE CSS STYDY COURSE TO BECOME A PROFESSIONAL.docxADVANCE CSS STYDY COURSE TO BECOME A PROFESSIONAL.docx
ADVANCE CSS STYDY COURSE TO BECOME A PROFESSIONAL.docx
 
Web Design Course: CSS lecture 4
Web Design Course: CSS  lecture 4Web Design Course: CSS  lecture 4
Web Design Course: CSS lecture 4
 

More from Knoldus Inc.

More from Knoldus Inc. (20)

Supply chain security with Kubeclarity.pptx
Supply chain security with Kubeclarity.pptxSupply chain security with Kubeclarity.pptx
Supply chain security with Kubeclarity.pptx
 
Mastering Web Scraping with JSoup Unlocking the Secrets of HTML Parsing
Mastering Web Scraping with JSoup Unlocking the Secrets of HTML ParsingMastering Web Scraping with JSoup Unlocking the Secrets of HTML Parsing
Mastering Web Scraping with JSoup Unlocking the Secrets of HTML Parsing
 
Akka gRPC Essentials A Hands-On Introduction
Akka gRPC Essentials A Hands-On IntroductionAkka gRPC Essentials A Hands-On Introduction
Akka gRPC Essentials A Hands-On Introduction
 
Entity Core with Core Microservices.pptx
Entity Core with Core Microservices.pptxEntity Core with Core Microservices.pptx
Entity Core with Core Microservices.pptx
 
Introduction to Redis and its features.pptx
Introduction to Redis and its features.pptxIntroduction to Redis and its features.pptx
Introduction to Redis and its features.pptx
 
GraphQL with .NET Core Microservices.pdf
GraphQL with .NET Core Microservices.pdfGraphQL with .NET Core Microservices.pdf
GraphQL with .NET Core Microservices.pdf
 
NuGet Packages Presentation (DoT NeT).pptx
NuGet Packages Presentation (DoT NeT).pptxNuGet Packages Presentation (DoT NeT).pptx
NuGet Packages Presentation (DoT NeT).pptx
 
Data Quality in Test Automation Navigating the Path to Reliable Testing
Data Quality in Test Automation Navigating the Path to Reliable TestingData Quality in Test Automation Navigating the Path to Reliable Testing
Data Quality in Test Automation Navigating the Path to Reliable Testing
 
K8sGPTThe AI​ way to diagnose Kubernetes
K8sGPTThe AI​ way to diagnose KubernetesK8sGPTThe AI​ way to diagnose Kubernetes
K8sGPTThe AI​ way to diagnose Kubernetes
 
Introduction to Circle Ci Presentation.pptx
Introduction to Circle Ci Presentation.pptxIntroduction to Circle Ci Presentation.pptx
Introduction to Circle Ci Presentation.pptx
 
Robusta -Tool Presentation (DevOps).pptx
Robusta -Tool Presentation (DevOps).pptxRobusta -Tool Presentation (DevOps).pptx
Robusta -Tool Presentation (DevOps).pptx
 
Optimizing Kubernetes using GOLDILOCKS.pptx
Optimizing Kubernetes using GOLDILOCKS.pptxOptimizing Kubernetes using GOLDILOCKS.pptx
Optimizing Kubernetes using GOLDILOCKS.pptx
 
Azure Function App Exception Handling.pptx
Azure Function App Exception Handling.pptxAzure Function App Exception Handling.pptx
Azure Function App Exception Handling.pptx
 
CQRS Design Pattern Presentation (Java).pptx
CQRS Design Pattern Presentation (Java).pptxCQRS Design Pattern Presentation (Java).pptx
CQRS Design Pattern Presentation (Java).pptx
 
ETL Observability: Azure to Snowflake Presentation
ETL Observability: Azure to Snowflake PresentationETL Observability: Azure to Snowflake Presentation
ETL Observability: Azure to Snowflake Presentation
 
Scripting with K6 - Beyond the Basics Presentation
Scripting with K6 - Beyond the Basics PresentationScripting with K6 - Beyond the Basics Presentation
Scripting with K6 - Beyond the Basics Presentation
 
Getting started with dotnet core Web APIs
Getting started with dotnet core Web APIsGetting started with dotnet core Web APIs
Getting started with dotnet core Web APIs
 
Introduction To Rust part II Presentation
Introduction To Rust part II PresentationIntroduction To Rust part II Presentation
Introduction To Rust part II Presentation
 
Data governance with Unity Catalog Presentation
Data governance with Unity Catalog PresentationData governance with Unity Catalog Presentation
Data governance with Unity Catalog Presentation
 
Configuring Workflows & Validators in JIRA
Configuring Workflows & Validators in JIRAConfiguring Workflows & Validators in JIRA
Configuring Workflows & Validators in JIRA
 

Recently uploaded

Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 

Recently uploaded (20)

Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
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
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
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
 
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...
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdf
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
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
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
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...
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 

Css3

  • 2. Agenda 1. Importance of CSS 2. CSS Definition 3. CSS3 Combinators 4. CSS3 Transforms 5. CSS3 Transitions 6. CSS3 Animations 7. Demo without JS 8. Demo with JS()
  • 3. Importance of CSS A simple web page without using CSS
  • 4. Same web page using CSS
  • 5. CSS Definition Design is not just something designers do. Design is marketing. Cascading Style Sheets (CSS) primary language used to describe look and formatting for webpages across the Internet and documents of markup in general. Use CSS to define styles for your documents, including the design, layout and variations in display for different devices and screen sizes.
  • 7. CSS Combinators There are four different combinators in CSS3: 1. Descendant selector 2. Child selector 3. Adjacent sibling selector 4. General sibling selector 1. Descendant selector The descendant selector matches all elements that are descendants of a specified element.
  • 8. <head> <style> div p { background-color: skyblue; } </style> </head> <body> <div> <p>Paragraph 1.</p> <p>Paragraph 2.</p> <span><p>Paragraph 3.</p></span> </div> <p>Paragraph 4. </p> <p>Paragraph 5. </p> </body>
  • 9.
  • 10. 2. Child selector The child selector selects all elements that are the immediate children of a specified element.
  • 11. <head> <style> div > p { background-color: skyblue; } </style> </head> <body> <div> <p>Paragraph 1.</p> <p>Paragraph 2.</p> <p>Paragraph 2.</p> <span><p>Paragraph 3.</p></span> </div> <p>Paragraph 4. </p> <p>Paragraph 5. </p> </body>
  • 13. 3. Adjacent Sibling Selector The adjacent sibling selector selects all elements that are the adjacent siblings of a specified element. Sibling elements must have the same parent element, and "adjacent" means "immediately following".
  • 16. 4. General Sibling Selector The general sibling selector selects all elements that are siblings of a specified element.
  • 17. <head> <style> div ~ p { background-color: skyblue; } </style> </head> <body> <div> <p>Paragraph 1.</p> <p>Paragraph 2.</p> </div> <p>Paragraph 3.</p> <p>Paragraph 4.</p> </body>
  • 19. CSS3 Transforms A transformation is an effect that lets an element change shape, size and position. CSS3 transforms allow you to translate, rotate, scale, and skew elements. CSS3 supports 2D and 3D transformations.
  • 20. CSS3 2D Transforms 2D transformation methods: – translate() – rotate() – scale() – skewX() – skewY()
  • 21. The translate() Method The translate() method moves an element from its current position (according to the parameters given for the X-axis and the Y-axis).
  • 22. <head> <style> div { width: 300px; height: 100px; background-color: skyblue; border: 1px solid black; -ms-transform: translate(150px,100px); -webkit-transform: translate(150px,100px); transform: translate(150px,100px); } </style> </head> <body> <div> The translate() method moves an element from its current position. This div element is moved 50 pixels to the right, and 100 pixels down from its current position. </div> </body>
  • 23. The rotate() Method The rotate() method rotates an element clockwise or counter- clockwise according to a given degree. –
  • 24. The scale() Method The scale() method increases or decreases the size of an element (according to the parameters given for the width and height).
  • 25. The skewX() & skewY() Method The skewX() and SkewY() method skews an element along the X-axis or Y-axis by the given angle. These property tilts an element to the left or right, like turning a triangle into a parallelogram. There is no shorthand skew property. email For entering email addresses, and hints that the @ should be shown on the keyboard by default. You can add the multiple attribute if more than one email address will be provided. email For entering email addresses, and hints that the @ should be shown on the keyboard by default. You can add the multiple attribute if more than one email address will be provided.
  • 26. div{ -ms-transform: skewX(20deg); -webkit-transform: skewX(20deg); transform: skewX(20deg); } div { -ms-transform: skewY(20deg); -webkit-transform: skewY(20deg); transform: skewY(20deg); }
  • 27. Browser Support for 2D Transforms
  • 28. CSS3 Transitions CSS3 transitions allows you to change property values smoothly (from one value to another), over a given duration. The following lists all the transition properties: Property Description transition : A shorthand property for setting the four transition properties into a single property. transition-delay : Specifies a delay (in seconds) for the transition effect.
  • 29. transition-duration : Specifies how many seconds or milliseconds a transition effect takes to complete transition-property : Specifies the name of the CSS property the transition effect is for transition-timing-function: Specifies the speed curve of the transition effect
  • 30. The transition-timing-function property can have the following values: • ease - specifies a transition effect with a slow start, then fast, then end slowly (this is default) • linear - specifies a transition effect with the same speed from start to end • ease-in - specifies a transition effect with a slow start • ease-out - specifies a transition effect with a slow end • ease-in-out - specifies a transition effect with a slow start and end
  • 31. CSS3 Animations An animation lets an element gradually change from one style to another. You can change as many CSS properties you want, as many times you want. To use CSS3 animation, you must first specify some keyframes for the animation. Keyframes hold what styles the element will have at certain times.
  • 32. The @keyframes Rule When you specify CSS styles inside the @keyframes rule, the animation will gradually change from the current style to the new style at certain times. To get an animation to work, you must bind the animation to an element.
  • 33. The following table lists the @keyframes rule and all the animation properties: Property Description @keyframes Specifies the animation code animation A shorthand property for setting all the animation properties animation-delay Specifies a delay for the start of an animation animation-direction Specifies whether an animation should play in reverse direction or alternate cycles
  • 34. animation-duration Specifies how many seconds or milliseconds an animation takes to complete one cycle animation-iteration-count Specifies the number of times an animation should be played animation-name Specifies the name of the @keyframes animation
  • 35. Browser Support for Animations