SlideShare a Scribd company logo
Designing Your Next
Generation Web Pages with
CSS3
Gil Fink
CEO, sparXys
@gilfink, http://www.gilfink.net
Box of Doom Story
• How hard it is to create a box with rounded
corners?
Once Upon a Time…
• Creating rounded corners involved:
o Constructing the box with images and CSS border property
• Left corner image
• Right corner image
• Usage of border property /
Usage of a third border line
image
o Using a lot of CSS manipulations
Designing Your Next Generation Web Pages with CSS3
CSS3 to the Rescue
border-radius property
Designing Your Next
Generation Web Pages with
CSS3
Gil Fink
CEO, sparXys
@gilfink, http://www.gilfink.net
Agenda
• CSS3: Recap
• Transitions, Transformations and Animation
• Responsive Design
• Q&A
• Summary
CSS3 in a Nutshell
• CSS: Cascading Style Sheets
o Describe the presentation semantics of HTML web pages
o Helps separate a document’s content from its layout and style
• Work on CSS3 began after CSS2 entered the
recommendation stage in 1999
• CSS3 is divided into modules
o Each module add new capabilities or extend features defined in CSS2
What’s new in CSS3?
• Transitions
• Transformations
• Animations
• New layout options
• Extended existing properties:
o Background
o Border
• And more
Transitions
• CSS3 support transitions
• Use the transition property and element events to
apply transitions
div
{
width: 50px;
height: 50px;
transition: width 2s; /* width change will apply a 2 second transition */
}
div:hover { /* hover will trigger the transition */
width: 150px;
}
Transformations
• CSS3 supports two and three dimensional element
transformations
o Use the transform property with transformation function
• You can apply transformations such as
o Translate
o Scale
o Rotate
o And more
#element
{
transform: rotate(30deg);
}
Animation
• CSS3 enables simple animations
• Use the @keyframes rule and animation property
@keyframes myAnim
{
0% { right: 0px; }
25% { right: 25px; background: blue; }
75% { right: 75px; background: red; }
100% { right: 100px; }
}
div
{
animation: myAnim 5s linear 5s infinite alternate ;
}
DEMO
Transitions, transformations and animations
http://desandro.github.io/3dtransforms/exampl
es/carousel-02-dynamic.html
http://desandro.github.io/3dtransforms/exampl
es/cube-02-show-sides.html
Responsive Design
• Optimization approach for UX view over a range of
devices
o Mobile, desktop, TV, Tablet and etc.
o UI depends on the device and its specifics (resolution, DPI and more)
Ways to Create a
Responsive Design
• Flexible layouts
o Flexbox
o Multi columns
o Grid layout
o Other CSS options
• Media queries
• And more
Flexible Layouts
• Flexible layouts uses proportional sizes:
• How can we do that with CSS3?
Sub
nav
content aside
Margins:2%
55%15% 20%
Multi Columns
• Arrange content in columns like in newspapers
• Content flows from one column to another
div
{
width: 200px;
column-width: 60px;
column-count: 3;
column-gap: 2em;
}
Flexible Box
• Position boxed elements inside a container element
• Controls how boxed elements relate to one another
o Flow direction, order and alignment
o Box sizes in response to container size
.container {
display: flexbox;
flex-direction: row;
border: 1px solid black;
width: 400px;
padding: 10px;
}
DEMO
Multi Columns and Flexbox
Media Queries
• Detect media features and respond accordingly
• Change the presentation of the content in response
to media changes
• Consist of a type and zero or more expressions
o Types can be screen, projection and resolution
o Expressions are the checks that will evaluated
Coding Media Queries
• If a media query expression is evaluated to true, the
styles in the query block are applied
• Rule of thumb - put media queries at the end of the
CSS file
.someDiv { width: 250px; height: 250px; }
@media only screen and (max-width: 1024px) {
.someDiv { width: 150px; height: 200px; }
}
@media only screen and (max-width: 800px) {
.someDiv { width: 120px; height: 180px; }
}
@media only screen and (max-width: 320px) {
.someDiv { width: 80px; height: 120px; }
}
DEMO
Media Queries
Questions?
Summary
• CSS3 changes the way we can design web pages:
o More layout and style options
o Options to replace JavaScript animation, transitions and transformations
• Make use of CSS3 today!
Thank You!

More Related Content

PPTX
Website trends 2012 presentation
PPTX
HTML5 for ASP.NET Developers
PPT
Box Model
PPTX
Css box-model
ODP
PDF
Sencha Touch Workshop
PPT
Getting started with html5
PPTX
New Elements & Features in CSS3
Website trends 2012 presentation
HTML5 for ASP.NET Developers
Box Model
Css box-model
Sencha Touch Workshop
Getting started with html5
New Elements & Features in CSS3

Viewers also liked (8)

PDF
End-to-End SPA Development using TypeScript
PDF
Building Scalable JavaScript Apps
PDF
Creating Data Driven HTML5 Applications
PDF
Single Page Apps
PDF
The Characteristics of a Successful SPA
PDF
Getting Started with the TypeScript Language
PPT
JavaScript Frameworks and Java EE – A Great Match
PPT
Running High Performance and Fault Tolerant Elasticsearch Clusters on Docker
End-to-End SPA Development using TypeScript
Building Scalable JavaScript Apps
Creating Data Driven HTML5 Applications
Single Page Apps
The Characteristics of a Successful SPA
Getting Started with the TypeScript Language
JavaScript Frameworks and Java EE – A Great Match
Running High Performance and Fault Tolerant Elasticsearch Clusters on Docker
Ad

Similar to Designing Your Next Generation Web Pages with CSS3 (20)

PPTX
MTA managing the graphical interface by using css
PPTX
Html5 more than just html5 v final
PDF
CSS3: Ripe and Ready to Respond
KEY
PPT
Web development basics (Part-2)
PPTX
Rich and Beautiful: Making Attractive Apps in HTML5 [Wpg 2013]
KEY
CSS and CSS3
PDF
The New CSS Layout - Dutch PHP Conference
PDF
Intro to CSS3
PDF
CSS3: Simply Responsive
PPTX
Comparing XAML and HTML: FIGHT!
KEY
Interactive Graphics
PPTX
Web technologies-course 04.pptx
PDF
CSS3: Are you experienced?
PPTX
PDF
Introduction to CSS3
KEY
The web standards gentleman: a matter of (evolving) standards)
PDF
Responsive Web Design (April 18th, Los Angeles)
PPT
MTA managing the graphical interface by using css
Html5 more than just html5 v final
CSS3: Ripe and Ready to Respond
Web development basics (Part-2)
Rich and Beautiful: Making Attractive Apps in HTML5 [Wpg 2013]
CSS and CSS3
The New CSS Layout - Dutch PHP Conference
Intro to CSS3
CSS3: Simply Responsive
Comparing XAML and HTML: FIGHT!
Interactive Graphics
Web technologies-course 04.pptx
CSS3: Are you experienced?
Introduction to CSS3
The web standards gentleman: a matter of (evolving) standards)
Responsive Web Design (April 18th, Los Angeles)
Ad

More from Gil Fink (20)

PDF
Becoming a Tech Speaker
PPTX
Web animation on steroids web animation api
PDF
The Time for Vanilla Web Components has Arrived
PDF
Stencil the time for vanilla web components has arrived
PDF
Stencil the time for vanilla web components has arrived
PDF
Stencil: The Time for Vanilla Web Components has Arrived
PDF
Stencil the time for vanilla web components has arrived
PDF
Being a tech speaker
PDF
Working with Data in Service Workers
PDF
Demystifying Angular Animations
PDF
Redux data flow with angular
PDF
Redux data flow with angular
PDF
Who's afraid of front end databases?
PDF
One language to rule them all type script
PDF
End to-end apps with type script
PDF
Web component driven development
PDF
Web components
PDF
Redux data flow with angular 2
PDF
Biological Modeling, Powered by AngularJS
PDF
Who's afraid of front end databases
Becoming a Tech Speaker
Web animation on steroids web animation api
The Time for Vanilla Web Components has Arrived
Stencil the time for vanilla web components has arrived
Stencil the time for vanilla web components has arrived
Stencil: The Time for Vanilla Web Components has Arrived
Stencil the time for vanilla web components has arrived
Being a tech speaker
Working with Data in Service Workers
Demystifying Angular Animations
Redux data flow with angular
Redux data flow with angular
Who's afraid of front end databases?
One language to rule them all type script
End to-end apps with type script
Web component driven development
Web components
Redux data flow with angular 2
Biological Modeling, Powered by AngularJS
Who's afraid of front end databases

Recently uploaded (20)

PPTX
Digital-Transformation-Roadmap-for-Companies.pptx
PDF
Spectral efficient network and resource selection model in 5G networks
PDF
Encapsulation theory and applications.pdf
PDF
The Rise and Fall of 3GPP – Time for a Sabbatical?
PDF
Encapsulation_ Review paper, used for researhc scholars
PDF
KodekX | Application Modernization Development
PDF
NewMind AI Weekly Chronicles - August'25 Week I
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
PDF
Advanced methodologies resolving dimensionality complications for autism neur...
PPTX
Cloud computing and distributed systems.
PPTX
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
PPTX
Spectroscopy.pptx food analysis technology
PDF
Approach and Philosophy of On baking technology
PDF
Diabetes mellitus diagnosis method based random forest with bat algorithm
PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
PDF
Network Security Unit 5.pdf for BCA BBA.
PPTX
Big Data Technologies - Introduction.pptx
DOCX
The AUB Centre for AI in Media Proposal.docx
PDF
Building Integrated photovoltaic BIPV_UPV.pdf
PDF
Review of recent advances in non-invasive hemoglobin estimation
Digital-Transformation-Roadmap-for-Companies.pptx
Spectral efficient network and resource selection model in 5G networks
Encapsulation theory and applications.pdf
The Rise and Fall of 3GPP – Time for a Sabbatical?
Encapsulation_ Review paper, used for researhc scholars
KodekX | Application Modernization Development
NewMind AI Weekly Chronicles - August'25 Week I
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
Advanced methodologies resolving dimensionality complications for autism neur...
Cloud computing and distributed systems.
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
Spectroscopy.pptx food analysis technology
Approach and Philosophy of On baking technology
Diabetes mellitus diagnosis method based random forest with bat algorithm
Reach Out and Touch Someone: Haptics and Empathic Computing
Network Security Unit 5.pdf for BCA BBA.
Big Data Technologies - Introduction.pptx
The AUB Centre for AI in Media Proposal.docx
Building Integrated photovoltaic BIPV_UPV.pdf
Review of recent advances in non-invasive hemoglobin estimation

Designing Your Next Generation Web Pages with CSS3

  • 1. Designing Your Next Generation Web Pages with CSS3 Gil Fink CEO, sparXys @gilfink, http://www.gilfink.net
  • 2. Box of Doom Story • How hard it is to create a box with rounded corners?
  • 3. Once Upon a Time… • Creating rounded corners involved: o Constructing the box with images and CSS border property • Left corner image • Right corner image • Usage of border property / Usage of a third border line image o Using a lot of CSS manipulations
  • 5. CSS3 to the Rescue border-radius property
  • 6. Designing Your Next Generation Web Pages with CSS3 Gil Fink CEO, sparXys @gilfink, http://www.gilfink.net
  • 7. Agenda • CSS3: Recap • Transitions, Transformations and Animation • Responsive Design • Q&A • Summary
  • 8. CSS3 in a Nutshell • CSS: Cascading Style Sheets o Describe the presentation semantics of HTML web pages o Helps separate a document’s content from its layout and style • Work on CSS3 began after CSS2 entered the recommendation stage in 1999 • CSS3 is divided into modules o Each module add new capabilities or extend features defined in CSS2
  • 9. What’s new in CSS3? • Transitions • Transformations • Animations • New layout options • Extended existing properties: o Background o Border • And more
  • 10. Transitions • CSS3 support transitions • Use the transition property and element events to apply transitions div { width: 50px; height: 50px; transition: width 2s; /* width change will apply a 2 second transition */ } div:hover { /* hover will trigger the transition */ width: 150px; }
  • 11. Transformations • CSS3 supports two and three dimensional element transformations o Use the transform property with transformation function • You can apply transformations such as o Translate o Scale o Rotate o And more #element { transform: rotate(30deg); }
  • 12. Animation • CSS3 enables simple animations • Use the @keyframes rule and animation property @keyframes myAnim { 0% { right: 0px; } 25% { right: 25px; background: blue; } 75% { right: 75px; background: red; } 100% { right: 100px; } } div { animation: myAnim 5s linear 5s infinite alternate ; }
  • 13. DEMO Transitions, transformations and animations http://desandro.github.io/3dtransforms/exampl es/carousel-02-dynamic.html http://desandro.github.io/3dtransforms/exampl es/cube-02-show-sides.html
  • 14. Responsive Design • Optimization approach for UX view over a range of devices o Mobile, desktop, TV, Tablet and etc. o UI depends on the device and its specifics (resolution, DPI and more)
  • 15. Ways to Create a Responsive Design • Flexible layouts o Flexbox o Multi columns o Grid layout o Other CSS options • Media queries • And more
  • 16. Flexible Layouts • Flexible layouts uses proportional sizes: • How can we do that with CSS3? Sub nav content aside Margins:2% 55%15% 20%
  • 17. Multi Columns • Arrange content in columns like in newspapers • Content flows from one column to another div { width: 200px; column-width: 60px; column-count: 3; column-gap: 2em; }
  • 18. Flexible Box • Position boxed elements inside a container element • Controls how boxed elements relate to one another o Flow direction, order and alignment o Box sizes in response to container size .container { display: flexbox; flex-direction: row; border: 1px solid black; width: 400px; padding: 10px; }
  • 20. Media Queries • Detect media features and respond accordingly • Change the presentation of the content in response to media changes • Consist of a type and zero or more expressions o Types can be screen, projection and resolution o Expressions are the checks that will evaluated
  • 21. Coding Media Queries • If a media query expression is evaluated to true, the styles in the query block are applied • Rule of thumb - put media queries at the end of the CSS file .someDiv { width: 250px; height: 250px; } @media only screen and (max-width: 1024px) { .someDiv { width: 150px; height: 200px; } } @media only screen and (max-width: 800px) { .someDiv { width: 120px; height: 180px; } } @media only screen and (max-width: 320px) { .someDiv { width: 80px; height: 120px; } }
  • 24. Summary • CSS3 changes the way we can design web pages: o More layout and style options o Options to replace JavaScript animation, transitions and transformations • Make use of CSS3 today!