Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Was nicht passt wird responsive gemacht - conference edition

Was nicht passt wird responsive gemacht - conference edition

the slides from my responsive presentation at code.talks 2014 in hamburg

Christoph Reinartz

October 10, 2014
Tweet

More Decks by Christoph Reinartz

Other Decks in Technology

Transcript

  1. Der klassische Ansatz • 2 Webseiten • Desktop-Seite • speziell

    auf mobile Geräte angepasste mobile Seite • Redirect auf m. * je nach User-Agent
  2. Beispiel: The Boston Globe • Full „fluid“ responsive • fluid

    innerhalb der Breakpoints • funktioniert gut bei textlastigen Seiten http://upstatement.com/blog/2012/01/how-to-approach-a-responsive-design/
  3. Beispiel: trivago • Sprungstufen-basiertes Layout • adaptives Layout • innerhalb

    der Breakpoints fixe Darstellung • ohne kompletten Relaunch möglich
  4. Eine Definition Responsive web design isn’t your site working on

    phones and tablets. It’s about your site working everywhere. https://twitter.com/ScottKellum
  5. Zutaten nach dem Rezept 
 von Ethan Marcotte ! •

    Relative Maße • Ein flexibles gridbasiertes Layout • Flexible Images und Medien • Media Queries
  6. EMs nutzen • skalierbare Einheit • 1em = aktuelle Fontgröße

    • 2em = doppelte Fontgröße body {font-size: 100%} body {font-size: 150%} font-size: 12px Textbeispiel Textbeispiel font-size: 1em Textbeispiel Textbeispiel
  7. Sieh das mal relativ! ! ! target / context =

    result Erstellung relativer Maße: Fonts / Grids
  8. Flexible Grids / Maße 960px 200px target / context =

    result (200 / 960) * 100 = 20,83%
  9. Media Types CSS 2.1 Media Types ! <link rel="stylesheet" type="text/css"

    href="core.css" media="screen" /> ! <link rel="stylesheet" type="text/css" href="print.css" media="print" />
  10. Media Queries CSS3 Nicht nur Device Typen sondern Devicegerätetypische Eigenschaften

    abfragen ! <link rel="stylesheet" type="text/css" href="style.css" media="screen and (device-width: 480px)" />
  11. Media Queries Mehrere Eigenschaften in einer Query ! @media screen

    and (max-device-width: 480px) 
 and (resolution: 192dpi) { 
 .column { float: none; } }
  12. Viewport-Metatag <meta content="width=device-width, initial-scale=1.0" name="viewport" /> Mit Viewport-Metatag viewport-width =

    device-width ! Ohne Viewport-Metatag Default-Canvas ~980px http://bkaprt.com/rwd/29
  13. The Truth… Your visitors don’t give 
 a shit if

    your site 
 is responsive. http://bradfrostweb.com/blog/web/responsive-web-design-missing-the-point/
  14. Mobile Strategie You May Be Losing Users 
 If Responsive

    Web Design Is Your Only Mobile Strategy http://www.smashingmagazine.com/2014/07/22/responsive-web-design-should-not-be-your-only-mobile-strategy/
  15. Page Sizes 72% of responsive websites deliver the same number

    of bytes regardless of screen size, even on slow mobile network connections. 
 http://www.guypo.com/uncategorized/real-world-rwd-performance-take-2/