Diese Präsentation wurde erfolgreich gemeldet.
Wir verwenden Ihre LinkedIn Profilangaben und Informationen zu Ihren Aktivitäten, um Anzeigen zu personalisieren und Ihnen relevantere Inhalte anzuzeigen. Sie können Ihre Anzeigeneinstellungen jederzeit ändern.

CSS Media Queries (WordCamp 2010)

4.013 Aufrufe

Veröffentlicht am

Webautoren haben verschiedene Möglichkeiten, den Geltungsbereich von CSS auf bestimmte Medien einzuschränken, sowohl bei der Einbindung eines Stylesheets als auch für bestimmte Regeln innerhalb des Stylesheets. Mit CSS3 Media Queries ist es möglich, die Einbindung von CSS nicht nur von einem bestimmten Medium abhängig zu machen, sondern auch davon, ob das Medium oder Ausgabegerät bestimmte Merkmale aufweist oder nicht.

Veröffentlicht in: Technologie
  • DOWNLOAD THIS BOOKS INTO AVAILABLE FORMAT (Unlimited) ......................................................................................................................... ......................................................................................................................... Download Full PDF EBOOK here { https://tinyurl.com/y6a5rkg5 } ......................................................................................................................... Download Full EPUB Ebook here { https://tinyurl.com/y6a5rkg5 } ......................................................................................................................... ACCESS WEBSITE for All Ebooks ......................................................................................................................... Download Full PDF EBOOK here { https://tinyurl.com/y6a5rkg5 } ......................................................................................................................... Download EPUB Ebook here { https://tinyurl.com/y6a5rkg5 } ......................................................................................................................... Download doc Ebook here { https://tinyurl.com/y6a5rkg5 } ......................................................................................................................... ......................................................................................................................... ......................................................................................................................... .............. Browse by Genre Available eBooks ......................................................................................................................... Art, Biography, Business, Chick Lit, Children's, Christian, Classics, Comics, Contemporary, Cookbooks, Crime, Ebooks, Fantasy, Fiction, Graphic Novels, Historical Fiction, History, Horror, Humor And Comedy, Manga, Memoir, Music, Mystery, Non Fiction, Paranormal, Philosophy, Poetry, Psychology, Religion, Romance, Science, Science Fiction, Self Help, Suspense, Spirituality, Sports, Thriller, Travel, Young Adult,
       Antworten 
    Sind Sie sicher, dass Sie …  Ja  Nein
    Ihre Nachricht erscheint hier
  • DOWNLOAD FULL BOOKS, INTO AVAILABLE FORMAT ......................................................................................................................... ......................................................................................................................... 1.DOWNLOAD FULL. PDF EBOOK here { https://tinyurl.com/y6a5rkg5 } ......................................................................................................................... 1.DOWNLOAD FULL. EPUB Ebook here { https://tinyurl.com/y6a5rkg5 } ......................................................................................................................... 1.DOWNLOAD FULL. doc Ebook here { https://tinyurl.com/y6a5rkg5 } ......................................................................................................................... 1.DOWNLOAD FULL. PDF EBOOK here { https://tinyurl.com/y6a5rkg5 } ......................................................................................................................... 1.DOWNLOAD FULL. EPUB Ebook here { https://tinyurl.com/y6a5rkg5 } ......................................................................................................................... 1.DOWNLOAD FULL. doc Ebook here { https://tinyurl.com/y6a5rkg5 } ......................................................................................................................... ......................................................................................................................... ......................................................................................................................... .............. Browse by Genre Available eBooks ......................................................................................................................... Art, Biography, Business, Chick Lit, Children's, Christian, Classics, Comics, Contemporary, Cookbooks, Crime, Ebooks, Fantasy, Fiction, Graphic Novels, Historical Fiction, History, Horror, Humor And Comedy, Manga, Memoir, Music, Mystery, Non Fiction, Paranormal, Philosophy, Poetry, Psychology, Religion, Romance, Science, Science Fiction, Self Help, Suspense, Spirituality, Sports, Thriller, Travel, Young Adult,
       Antworten 
    Sind Sie sicher, dass Sie …  Ja  Nein
    Ihre Nachricht erscheint hier
  • DOWNLOAD FULL BOOKS, INTO AVAILABLE FORMAT ......................................................................................................................... ......................................................................................................................... 1.DOWNLOAD FULL. PDF EBOOK here { https://tinyurl.com/y6a5rkg5 } ......................................................................................................................... 1.DOWNLOAD FULL. EPUB Ebook here { https://tinyurl.com/y6a5rkg5 } ......................................................................................................................... 1.DOWNLOAD FULL. doc Ebook here { https://tinyurl.com/y6a5rkg5 } ......................................................................................................................... 1.DOWNLOAD FULL. PDF EBOOK here { https://tinyurl.com/y6a5rkg5 } ......................................................................................................................... 1.DOWNLOAD FULL. EPUB Ebook here { https://tinyurl.com/y6a5rkg5 } ......................................................................................................................... 1.DOWNLOAD FULL. doc Ebook here { https://tinyurl.com/y6a5rkg5 } ......................................................................................................................... ......................................................................................................................... ......................................................................................................................... .............. Browse by Genre Available eBooks ......................................................................................................................... Art, Biography, Business, Chick Lit, Children's, Christian, Classics, Comics, Contemporary, Cookbooks, Crime, Ebooks, Fantasy, Fiction, Graphic Novels, Historical Fiction, History, Horror, Humor And Comedy, Manga, Memoir, Music, Mystery, Non Fiction, Paranormal, Philosophy, Poetry, Psychology, Religion, Romance, Science, Science Fiction, Self Help, Suspense, Spirituality, Sports, Thriller, Travel, Young Adult,
       Antworten 
    Sind Sie sicher, dass Sie …  Ja  Nein
    Ihre Nachricht erscheint hier
  • DOWNLOAD FULL BOOKS, INTO AVAILABLE Format, ......................................................................................................................... ......................................................................................................................... 1.DOWNLOAD FULL. PDF EBOOK here { https://tinyurl.com/y6a5rkg5 } ......................................................................................................................... 1.DOWNLOAD FULL. EPUB Ebook here { https://tinyurl.com/y6a5rkg5 } ......................................................................................................................... 1.DOWNLOAD FULL. doc Ebook here { https://tinyurl.com/y6a5rkg5 } ......................................................................................................................... 1.DOWNLOAD FULL. PDF EBOOK here { https://tinyurl.com/y6a5rkg5 } ......................................................................................................................... 1.DOWNLOAD FULL. EPUB Ebook here { https://tinyurl.com/y6a5rkg5 } ......................................................................................................................... 1.DOWNLOAD FULL. doc Ebook here { https://tinyurl.com/y6a5rkg5 } ......................................................................................................................... ......................................................................................................................... ......................................................................................................................... .............. Browse by Genre Available eBooks ......................................................................................................................... Art, Biography, Business, Chick Lit, Children's, Christian, Classics, Comics, Contemporary, Cookbooks, Crime, Ebooks, Fantasy, Fiction, Graphic Novels, Historical Fiction, History, Horror, Humor And Comedy, Manga, Memoir, Music, Mystery, Non Fiction, Paranormal, Philosophy, Poetry, Psychology, Religion, Romance, Science, Science Fiction, Self Help, Suspense, Spirituality, Sports, Thriller, Travel, Young Adult,
       Antworten 
    Sind Sie sicher, dass Sie …  Ja  Nein
    Ihre Nachricht erscheint hier
  • DOWNLOAD FULL eBOOK INTO AVAILABLE FORMAT ......................................................................................................................... ......................................................................................................................... 1.DOWNLOAD FULL. PDF eBook here { https://tinyurl.com/y6a5rkg5 } ......................................................................................................................... 1.DOWNLOAD FULL. EPUB eBook here { https://tinyurl.com/y6a5rkg5 } ......................................................................................................................... 1.DOWNLOAD FULL. doc eBook here { https://tinyurl.com/y6a5rkg5 } ......................................................................................................................... 1.DOWNLOAD FULL. PDF eBook here { https://tinyurl.com/y6a5rkg5 } ......................................................................................................................... 1.DOWNLOAD FULL. EPUB eBook here { https://tinyurl.com/y6a5rkg5 } ......................................................................................................................... 1.DOWNLOAD FULL. doc eBook here { https://tinyurl.com/y6a5rkg5 } ......................................................................................................................... ......................................................................................................................... ......................................................................................................................... .............. Browse by Genre Available eBooks ......................................................................................................................... Art, Biography, Business, Chick Lit, Children's, Christian, Classics, Comics, Contemporary, CookeBOOK Crime, eeBOOK Fantasy, Fiction, Graphic Novels, Historical Fiction, History, Horror, Humor And Comedy, Manga, Memoir, Music, Mystery, Non Fiction, Paranormal, Philosophy, Poetry, Psychology, Religion, Romance, Science, Science Fiction, Self Help, Suspense, Spirituality, Sports, Thriller, Travel, Young Adult,
       Antworten 
    Sind Sie sicher, dass Sie …  Ja  Nein
    Ihre Nachricht erscheint hier

CSS Media Queries (WordCamp 2010)

  1. 1. CSS Media Queries Auf Geräte und Browser reagieren Michael Jendryschik
  2. 2. <ul><li>Es gibt verschiedene Möglichkeiten, den Geltungsbereich von CSS auf bestimmte Medien einzuschränken. </li></ul>
  3. 3. <ul><li><link rel=&quot;stylesheet&quot; type=&quot;text/css&quot; href=&quot;style.css&quot; media=&quot;screen&quot; /> </li></ul><ul><li>@import url(&quot;style.css&quot;) screen ; </li></ul><ul><li>@media print { div#header, div#sidebar, div#footer { display: none; } } </li></ul>
  4. 4. aural für Sprachbrowser
  5. 5. braille für Ausgabegeräte mit Braillezeile
  6. 6. embossed für Brailledrucker
  7. 7. handheld für Handcomputer und Mobiltelefone
  8. 8. print für Drucker
  9. 9. projection für Projektoren
  10. 10. screen für Computermonitore
  11. 11. tty für Ausgabemedien mit Festbreitenschrift
  12. 12. tv für Fernseher
  13. 13. <ul><li>Mit CSS Media Queries ist es möglich, die Einbindung von CSS davon abhängig zu machen, ob ein Medium oder Ausgabegerät bestimmte Merkmale aufweist oder nicht. </li></ul>
  14. 17. <ul><li>@media (min-width: 950px) { </li></ul><ul><li>/* Regeln für breite Browserfenstern */ </li></ul><ul><li>} </li></ul><ul><li>@media (min-width: 450px) and (max-width: 950px) { </li></ul><ul><li>  /* Regeln für Netbooks */ </li></ul><ul><li>} </li></ul><ul><li>@media (max-width: 450px) { </li></ul><ul><li>/* Regeln für mobile Geräte */ </li></ul><ul><li>} </li></ul>
  15. 20. <ul><li>@media screen and (max-width: 600px) { </li></ul><ul><li>.mast, </li></ul><ul><li>.intro, </li></ul><ul><li>.main, </li></ul><ul><li>.footer { </li></ul><ul><li>float: none; </li></ul><ul><li>width: auto; </li></ul><ul><li>} </li></ul><ul><li>} </li></ul>
  16. 25. <ul><li>@media screen and (max-width: 500px) { ... } </li></ul><ul><li>@media screen and (max-width: 800px) { ... } </li></ul><ul><li>@media screen and (min-width: 1024px) { ... } </li></ul><ul><li>@media handheld and (max-device-width: 480px), </li></ul><ul><li>screen and (max-device-width: 480px), </li></ul><ul><li>screen and (max-width: 600px) { ... } </li></ul><ul><li>@media screen and (min-width: 920px) { ... } </li></ul><ul><li>@media screen and (min-width: 1350px) { ... } </li></ul><ul><li>@media screen and (min-width: 1500px) { ... } </li></ul><ul><li>@media only screen and (max-device-width: 480px) { ... } </li></ul><ul><li>@media only screen and (min-device-width: 768px) </li></ul><ul><li>and (max-device-width: 1024px) { ... } </li></ul>
  17. 27. CSS Media Queries: Grundlagen und Syntax
  18. 28. <ul><li>Media Queries sind logische Ausdrücke, die die Angabe von Medientypen und bestimmten Medienmerkmalen miteinander verknüpfen. </li></ul>
  19. 29. screen and (max-width: 300px ) Wert screen and ( max-width : 300px) Merkmal screen and ( max-width: 300px ) Ausdruck screen and (max-width: 300px) Verknüpfung screen and (max-width: 300px) Medientyp screen and (max-width: 300px) Media Query Beispiel Bezeichnung
  20. 30. <ul><li>Das Schlüsselwort and drückt ein logisches Und aus. </li></ul><ul><li>screen and (max-width: 300px) </li></ul><ul><li>(min-width: 450px) and (max-width: 950px) </li></ul>
  21. 31. <ul><li>Ein Komma steht für ein logisches Oder. </li></ul><ul><li>@import url(&quot;style.css&quot;) screen , projection; </li></ul><ul><li><link rel=&quot;stylesheet&quot; </li></ul><ul><li>type=&quot;text/css&quot; href=&quot;style.css&quot; </li></ul><ul><li>media=&quot;screen and (min-width: 800px) , </li></ul><ul><li>projection and (min-width: 800px)&quot; /> </li></ul>
  22. 32. <ul><li>Das Schlüsselwort not steht für eine logische Negation. </li></ul><ul><li><link rel=&quot;stylesheet&quot; type=&quot;text/css&quot; </li></ul><ul><li>href=&quot;style.css&quot; </li></ul><ul><li>media=&quot; not screen and (color)&quot; /> </li></ul>
  23. 33. <ul><li>Das Schlüsselwort only ist ein Workaround für veraltete Browser, die mit Media Queries nicht umzugehen wissen . </li></ul><ul><li><link rel=&quot;stylesheet&quot; type=&quot;text/css&quot; </li></ul><ul><li>href=&quot;style.css&quot; </li></ul><ul><li>media=&quot; only screen and (color)&quot; /> </li></ul>
  24. 34. CSS3 Media Queries Medienmerkmale
  25. 35. Höhe des Geräts Ja device-height Breite des Geräts Ja device-width Höhe der Anzeigefläche Ja height Breite der Anzeigefläche Ja width Beschreibung min/max Merkmal
  26. 36. <ul><li>Viewport mindestens 500px hoch? </li></ul><ul><li><link rel=&quot;stylesheet&quot; type=&quot;text/css&quot; </li></ul><ul><li>href=&quot;vertical-align.css&quot; </li></ul><ul><li>media=&quot;screen and (min-height: 500px)&quot; </li></ul><ul><li>/> </li></ul>
  27. 37. <ul><li>iPhone? </li></ul><ul><li><link rel=&quot;stylesheet&quot; type=&quot;text/css&quot; </li></ul><ul><li>href=&quot;iphone.css&quot; </li></ul><ul><li>media=&quot;only screen </li></ul><ul><li>and (max-device-width: 480px)&quot; </li></ul><ul><li>/> </li></ul>
  28. 38. Ausrichtung des Geräts Nein orientation Verhältnis der Merkmale device-width und device-height Ja device-aspect-ratio Verhältnis der Merkmale width und height Ja aspect-ratio Beschreibung min/max Merkmal
  29. 39. <ul><li>Seitenverhältnis 16:9? </li></ul><ul><li>screen and (device-aspect-ratio: 16/9) </li></ul><ul><li>screen and (device-aspect-ratio: 32/18) </li></ul><ul><li>screen and (device-aspect-ratio: 1280/720) </li></ul>
  30. 40. <ul><li>Horizontale oder vertikale </li></ul><ul><li>Ausrichtung eines iPad? </li></ul><ul><li><link ... href=&quot;ipad-portrait.css&quot; </li></ul><ul><li>media=&quot;(min-device-width: 481px) </li></ul><ul><li>and (max-device-width: 1024px) </li></ul><ul><li>and (orientation: portrait)&quot; /> </li></ul><ul><li><link ... href=&quot;ipad-landscape.css&quot; </li></ul><ul><li>media=&quot;(min-device-width: 481px) </li></ul><ul><li>and (max-device-width: 1024px) </li></ul><ul><li>and (orientation: landscape)&quot; /> </li></ul>
  31. 41. Anzahl der Bits pro Pixel im Bildspeicher eines einfarbigen Geräts Ja monochrome Anzahl der Einträge in der Farb-Lookup-Tabelle des Geräts Ja color-index Farbtiefe des Geräts Ja color Beschreibung min/max Merkmal
  32. 42. <ul><li>Schwarzweiß- oder Farbdrucker? </li></ul><ul><li><link rel=&quot;stylesheet&quot; type=&quot;text/css&quot; </li></ul><ul><li>href=&quot;print-color.css&quot; </li></ul><ul><li>media=&quot;print and (color)&quot; /> </li></ul><ul><li><link rel=&quot;stylesheet&quot; type=&quot;text/css&quot; </li></ul><ul><li>href=&quot;print-monochrome.css&quot; </li></ul><ul><li>media=&quot;print and (monochrome)&quot; /> </li></ul>
  33. 44. <ul><li>iPhone 4? </li></ul><ul><li><link rel=&quot;stylesheet&quot; type=&quot;text/css&quot; </li></ul><ul><li>href=&quot;/css/retina.css&quot; </li></ul><ul><li>media=&quot;only screen and </li></ul><ul><li>( -webkit-min-device-pixel-ratio: 2 )&quot; /> </li></ul>
  34. 45. Browserkompatibilität
  35. 47. <ul><li>Michael Jendryschik </li></ul><ul><li>http://jendryschik.de </li></ul><ul><li>http://www.itemis.de </li></ul><ul><li>http://www.webkrauts.de </li></ul><ul><li>http://twitter.com/jendryschik </li></ul><ul><li>http:// facebook.com/jendryschik </li></ul>
  36. 48. Quellennachweis <ul><li>http://www.digitale-chancen.de/transfer/assets/468.jpg </li></ul><ul><li>http://ceipntrasradelapiedad.files.wordpress.com/2010/03/braille.jpg </li></ul><ul><li>http://gadgets.boingboing.net/Palm-Pre-Disassembled.jpg </li></ul><ul><li>http://upload.wikimedia.org/wikipedia/commons/d/dc/Westermann_Druckerei_1890.png </li></ul><ul><li>http://www.infocus.rbt-pressroom.eu/de/download/der-heimkino-projektor-sp8602-kommt-vielen-hochleistungsfhigen-eigenschaften-auf-den-markt-4.jpg </li></ul><ul><li>http://upload.wikimedia.org/wikipedia/commons/2/2c/Monitor_in_gutter.jpg </li></ul><ul><li>http://cmsdata.iucn.org/img/original/iberian_lynx_by_antonio_rivas.jpg </li></ul><ul><li>http://www.comcast.com/MediaLibrary/1/1/About/PressRoom/Images/LogoAndMediaLibrary/Photography/CableNetworks/Teletubbies-Group2.jpg </li></ul><ul><li>http://ie.microsoft.com/testdrive/HTML5/85CSS3_MediaQueries/Default.html </li></ul><ul><li>http://www.alistapart.com/d/responsive-web-desgin/ex/ex-site-mini.html </li></ul><ul><li>http://www.hicksdesign.co.uk/journal </li></ul><ul><li>http://www.pm.ruhr-uni-bochum.de/imperia/md/images/pressestelle/einstein.jpg </li></ul><ul><li>http://www.colgate.at/OralHealthMonth/AT/2009/arch/2007/colgate_merkmale0805.jpg </li></ul><ul><li>http://www.claudia-berg-grafik.de/claudia_berg_Grasland.jpg </li></ul><ul><li>http://www.grossi-online.de/gallery2/d/314-1/Farbe_001.jpg </li></ul><ul><li>http://www.apple.com/iphone/ </li></ul><ul><li>http://wallpapers-diq.net/wallpapers/30/Firefox%2C_The_Browser%2C_Reloaded.jpg </li></ul>

×