More Related Content Similar to Смартфоны и планшетники - mobile-friendly веб-разработка помимо десктопа - RIT++ - Moscow 25.04.2011 Similar to Смартфоны и планшетники - mobile-friendly веб-разработка помимо десктопа - RIT++ - Moscow 25.04.2011 (20) More from Patrick Lauke (20) Смартфоны и планшетники - mobile-friendly веб-разработка помимо десктопа - RIT++ - Moscow 25.04.20115. “remove iPhone from ass”
Peter-Paul Koch, The iPhone obsession
www.quirksmode.org/blog/archives/2010/02/the_iphone_obse.html
18. “Desktop computers and mobile devices are so different that
the only way to offer a great user experience is to create two
separate designs — typically with fewer features for mobile.”
www.useit.com/alertbox/mobile-redesign.html
30. The Sage “... accepts the ebb and flow of things,
Nurtures them, but does not own them,”
Tao Te Ching; 2 Abstraction
www.alistapart.com/articles/dao
33. Media types
all braille
embossed handheld
print projection
screen speech
tty tv
34. CSS 2.1 Media Types
<link rel="stylesheet" ...
media="print" href="...">
@import url("...") print;
@media print {
// insert CSS rules here
}
35. CSS 3 Media Queries
“...the new hotness” Jeffrey Zeldman
http://www.zeldman.com/2010/04/08/best-aea-yet/
36. CSS 3 Media Queries
● extend concept of CSS 2.1 Media Types
● more granular control of capabilities
http://www.w3.org/TR/css3-mediaqueries/
37. Media features
width color
height color-index
device-width monochrome
device-height resolution
orientation scan
aspect-ratio grid
device-aspect-ratio
38. CSS 3 Media Queries
<link rel="stylesheet" ...
media="screen and (max-width:480px)" href="...">
@import url("...") screen and (max-width:480px);
@media screen and (max-width:480px) {
// insert CSS rules here
}
39. Multiple media queries
@media screen and (max-width:480px) {
// screen device and width < 480px
}
@media screen and (max-width:980px) {
// screen device and width < 980px
}
@media screen and (min-width:980px) {
// screen device and width > 980px
}
54. viewport meta
<meta name="viewport" content="width=320">
http://developer.apple.com/safari/library/documentation/AppleApplications/Reference/SafariWebContent/UsingtheViewport/UsingtheViewport.html
62. CSS Device Adaptation
@viewport {
width: 320px;
zoom: 2.3;
user-zoom: fixed;
}
dev.w3.org/csswg/css-device-adapt
Currently only in Opera Mobile 11 with -o- prefix
dev.opera.com/articles/view/an-introduction-to-meta-viewport-and-viewport
63. Viewport properties
width / min-width / max-width user-zoom
height / min-height / max-height orientation
zoom / min-zoom / max-zoom
64. @media + @viewport
@media screen and (max-device-width: 550px) {
@-o-viewport {
width: 550px;
}
}
only apply viewport width fixing on small-screen devices
65. BUG ALERT: Opera currently not re-running Media Queries on portrait/landscape switch
76. video, audio und canvas
without plug-ins
(Java / Flash / Silverlight absent from some devices)