Elements
Attributes
Selectors
Properties
5
Why Should I Care?
Key technology in the HTML5 family
Benefits
Improve response times
Less reliance on JavaScript and plug-ins
Less site maintenance
Good Patterns
Progressive enhancement
Adaptive design
A new audience for us
What is CSS3?
Last update: June 13, 2011
Geolocation
ECMA
HTML CSS Web Apps SVG
7
What is CSS3?
Defines visual appearance
of webpages
Divided into over 50
modules
Vendor prefixes used to
specify browser
extensions
-ms-
-moz-
Geolocation
ECMA
-webkit-
HTML CSS Web Apps SVG
PAGE 8
Whats New in CSS3?
2D Transforms 3D Transforms
Backgrounds & Borders Animations
Gradient
Color
CSS Exclusions (Floats)
Values and Units Flexible Box (Flexbox)
Selectors Layout
Web Fonts Grid Layout
Media Queries Multi-column Layout
Region
Namespaces SVG Filter Effects
Text Shadow
Transitions
PAGE 9
Media Queries
A look
11
Media Queries
Examine device properties to determine optimal delivery
and placement of content
The CSS3 Media Queries Module specifies methods to
enable web developers to scope a style sheet to a set of
precise device capabilities.
Adapt output based on media type
The Desktop Browser, Screen, Print
Mobile Browsers
Tablet form-factors
Televisions
Game Consoles
Media Queries Samples
@media screen and (max-width: 600px) {
body {
font-size: 80%;
}
}
min/max-width color
min/max-height color-index
device-width monochrome
device-height resolution
orientation
aspect-ratio
device-aspect-ratio
PAGE 14
http://mediaqueri.es
15
View States
device-
portrait
full-screen
snapped
fill
Snap
Fill
Blog http://blogs.msdn.com/dorischen
Media Queries: Portrait View
Before After
19
Space is used more efficiently after apply all css rules in Media Queries
Advanced Layout
Manage the wireframe
22
CSS 3 flexible box layout
Define direction and display: flexbox
ordering of flexible -ms-box-direction
box items -ms-box-orient
Define how to -ms-box-ordinal-
distribute and share group
free space to flexibly -ms-box-line-
space and size progression
elements -ms-box-lines
Align items -ms-box-pack
horizontally or -ms-box-flex
vertically -ms-box-align
CSS 3 flexible box layout uses
Build simple designs that partition
space vertically or horizontally
27
28
CSS3 grid layout uses
Enables you to easily design grid-aligned apps
that partition space vertically and horizontally
31
CSS3 multiple column layout
Break text across column-count
multiple columns column-width
PAGE 45