SlideShare une entreprise Scribd logo
1  sur  88
Télécharger pour lire hors ligne
USING         MEDIA QUERIES
to build Mobile Web Applications
@kevinderudder working for
eGuidelines and a lecturer at the
Technical University of West Flanders.

Contact me on kevin@e-guidelines.be
Website on a desktop   Website on a mobile phone
Agenda



•   Why this topic
•   Native vs Web apps
•   Responsive Design
•   HTML5 and CSS3 to the rescue
•   Usefull HTML5 Tags
•   Media Queries
WHY THIS TOPIC
Photo by http://neuroticworkaholic.blogspot.com
As a web developer you should target
        multiple (all) devices
HOW??
Native vs WEB
Native Development

• Windows Metro Applications
  • XAML with C#, VB.NET or C++
  • HTML with JavaScript


• iOS apps
  • Objective C


• Android
  • Java
HTML5 and CSS3
to the rescue
=   CONTENT




=   UI
HTML5

   Structure    Indexed DB     File APIs     Forms




   Audio and                   History
                Web Workers                   XHR2
     Video                    Navigation

                                                         ...

                              Drag and
    Canvas      WebSockets                 Messaging
                                Drop



                Server-Sent
  Web Storage                  Offline     Geolocation
                  Events
HTML5

   Structure    Indexed DB     File APIs     Forms




   Audio and                   History
                Web Workers                   XHR2
     Video                    Navigation

                                                         ...

                              Drag and
    Canvas      WebSockets                 Messaging
                                Drop



                Server-Sent
  Web Storage                  Offline     Geolocation
                  Events
CSS3


       Rounded                    Colors
                   Box Shadow                  Text Effects
       Corners                   HSL, HSLA




                                Multi-column
       Box Model   Web Fonts                    Borders
                                  layout




        Media                                   Attribute
                   Background    Selectors
        Queries                                 matching
CSS3


       Rounded                    Colors
                   Box Shadow                  Text Effects
       Corners                   HSL, HSLA




                                Multi-column
       Box Model   Web Fonts                    Borders
                                  layout




        Media                                   Attribute
                   Background    Selectors
        Queries                                 matching
Let’s get started and change that MVC site
into a cross platform/device web application
Before you even think about designing

CONTENT IS KING
How do you point to the specific content??
<div id=“header”> <div id=“top” />...
          <div id=“navigation”> <div id=“menu”>...

                                 <div id=“main”>



                               <div class=“content”>
<div id=“left”>



                               <div class=“content”>



                     <div id=“footer”>
<header>
           <nav>

                     <section>



                     <article>
<aside>



                     <article>



          <footer>
<header />         <nav />


                  <article />             <section />


 <aside />




<footer />
<header />


               <nav />


<section />




              <aside />




              <article />
DEMO
<header />         <nav />


                  <article />             <section />


 <aside />




<footer />
Make it MOBILE
How are you gonna serve the page to the device
     1. Redirect
     2. Responsive design via Media Queries
How are you gonna serve the page to the device
     1. Redirect
     2. Responsive design via Media Queries
<script type="text/javascript">

   if (screen.width <= 320) {
       document.location = "m.microsoft.com";
   }

</script>
This is good, if you want to deliver different
                   content
But, do you create a custom experience for
       each (new) browser or device
How are you gonna serve the page to the device
     1. Redirect
     2. Responsive design via Media Queries
What does it mean: RESPONSIVE
Pictures of M. vatia
Pictures of M. vatia
If you want to make your web app responsive, you
should implement 3 ingredients
     • A flexible, grid-based layout
     • Flexible images and media
     • Media Queries
We will only focus on Media Queries
Media Queries allow you write design code
 based on the characteristics of a device
Media Queries exists out of 2 parts

                     MEDIA QUERY

          Type               Query or Expression

  @media all and (max-width: 640px) {

  }
Media Queries exists out of 2 parts
 1. Media Type
 2. Expression
Media Types
Global.css
The media types

                                                             Taken from the W3C site
All          Suitable for all devices
Braille      Intended for braille tactile feedback devices
Embossed     Intended for paged braille printers
Handheld     Intended for handheld devices
Print        Intended for paged material
Projection   Intended for projected presentations
Screen       Intended primarily for color computer screens
Speech       Inteded for speech synthesizers
Tty          Media using a fixed character grid
Tv           Intended for television-type devices
AHA, there is something like handheld
@media screen
{
    body
    {
         background-color: Red;
    }
}

@media handheld
{
    body
    {
         background-color: Yellow;
    }
}

                                     This is not yellow
Old devices didn’t have capable browsers
Modern mobile devices use screen as media type
Media Queries exists out of 2 parts
 1. Media Type
 2. Expression
MEDIA QUERY

     Type            Query or Expression

@media all and (max-width: 640px) {
                   Feature           Value


}
The Features

Features with min- and max- prefixes

•   Width                     •   Aspect-ratio
•   Height                    •   Device-aspect-ratio
•   Device-width              •   Color
•   Device-height             •   Color-index
•   Resolution                •   Monochrome
The Features

Features without min- and max- prefixes
• Orientation
• Scan
• Grid
3 Ways to implement Media Queries


1.




2.



3.
A Media Query
Combine multiple queries
Combine multiple queries
NOT
DEMO
RESOURCES
Thank you
kevin@e-guidelines.be

Contenu connexe

En vedette

CSS3: Using media queries to improve the web site experience
CSS3: Using media queries to improve the web site experienceCSS3: Using media queries to improve the web site experience
CSS3: Using media queries to improve the web site experienceZoe Gillenwater
 
Flexbox: One Giant Leap for Web Layout (CSS Day 2013)
Flexbox: One Giant Leap for Web Layout (CSS Day 2013)Flexbox: One Giant Leap for Web Layout (CSS Day 2013)
Flexbox: One Giant Leap for Web Layout (CSS Day 2013)Stephen Hay
 
Adapt! Media queries and viewport
Adapt! Media queries and viewportAdapt! Media queries and viewport
Adapt! Media queries and viewportChris Mills
 
The Backside of the Class (CSS Day 2015)
The Backside of the Class (CSS Day 2015)The Backside of the Class (CSS Day 2015)
The Backside of the Class (CSS Day 2015)Stephen Hay
 
Real-world Responsive Design @ Breaking Development 2011
Real-world Responsive Design @ Breaking Development 2011Real-world Responsive Design @ Breaking Development 2011
Real-world Responsive Design @ Breaking Development 2011Stephen Hay
 
CSS3 Media Queries: Mobile Elixir or CSS Snake Oil
CSS3 Media Queries: Mobile Elixir or CSS Snake OilCSS3 Media Queries: Mobile Elixir or CSS Snake Oil
CSS3 Media Queries: Mobile Elixir or CSS Snake Oiljameswillweb
 
Meta layout: a closer look at media queries
Meta layout: a closer look at media queriesMeta layout: a closer look at media queries
Meta layout: a closer look at media queriesStephen Hay
 
From Deception to Clarity
From Deception to ClarityFrom Deception to Clarity
From Deception to ClarityStephen Hay
 
Dynamic vs static
Dynamic vs staticDynamic vs static
Dynamic vs staticNicole Ryan
 
Beyond Media Queries: Anatomy of an Adaptive Web Design
Beyond Media Queries: Anatomy of an Adaptive Web DesignBeyond Media Queries: Anatomy of an Adaptive Web Design
Beyond Media Queries: Anatomy of an Adaptive Web DesignBrad Frost
 
CSS3, Media Queries, and Responsive Design
CSS3, Media Queries, and Responsive DesignCSS3, Media Queries, and Responsive Design
CSS3, Media Queries, and Responsive DesignZoe Gillenwater
 
More than Media Queries: Reframing Responsive UX - SXSW 2016
More than Media Queries: Reframing Responsive UX - SXSW 2016More than Media Queries: Reframing Responsive UX - SXSW 2016
More than Media Queries: Reframing Responsive UX - SXSW 2016Matt Gibson
 
HTML Block and Inline Elements
HTML Block and Inline ElementsHTML Block and Inline Elements
HTML Block and Inline ElementsWebtech Learning
 
The future of media queries?
The future of media queries?The future of media queries?
The future of media queries?yiibu
 
The Future State of Layout
The Future State of LayoutThe Future State of Layout
The Future State of LayoutStephen Hay
 
Maintainable CSS
Maintainable CSSMaintainable CSS
Maintainable CSSStephen Hay
 
CSS3 Media Queries
CSS3 Media QueriesCSS3 Media Queries
CSS3 Media QueriesRuss Weakley
 
Go With The Flow
Go With The FlowGo With The Flow
Go With The FlowStephen Hay
 
Social media and your website
Social media and your websiteSocial media and your website
Social media and your websiteNicole Ryan
 

En vedette (20)

CSS3: Using media queries to improve the web site experience
CSS3: Using media queries to improve the web site experienceCSS3: Using media queries to improve the web site experience
CSS3: Using media queries to improve the web site experience
 
Flexbox: One Giant Leap for Web Layout (CSS Day 2013)
Flexbox: One Giant Leap for Web Layout (CSS Day 2013)Flexbox: One Giant Leap for Web Layout (CSS Day 2013)
Flexbox: One Giant Leap for Web Layout (CSS Day 2013)
 
Adapt! Media queries and viewport
Adapt! Media queries and viewportAdapt! Media queries and viewport
Adapt! Media queries and viewport
 
The Backside of the Class (CSS Day 2015)
The Backside of the Class (CSS Day 2015)The Backside of the Class (CSS Day 2015)
The Backside of the Class (CSS Day 2015)
 
CSS Font & Text style
CSS Font & Text style CSS Font & Text style
CSS Font & Text style
 
Real-world Responsive Design @ Breaking Development 2011
Real-world Responsive Design @ Breaking Development 2011Real-world Responsive Design @ Breaking Development 2011
Real-world Responsive Design @ Breaking Development 2011
 
CSS3 Media Queries: Mobile Elixir or CSS Snake Oil
CSS3 Media Queries: Mobile Elixir or CSS Snake OilCSS3 Media Queries: Mobile Elixir or CSS Snake Oil
CSS3 Media Queries: Mobile Elixir or CSS Snake Oil
 
Meta layout: a closer look at media queries
Meta layout: a closer look at media queriesMeta layout: a closer look at media queries
Meta layout: a closer look at media queries
 
From Deception to Clarity
From Deception to ClarityFrom Deception to Clarity
From Deception to Clarity
 
Dynamic vs static
Dynamic vs staticDynamic vs static
Dynamic vs static
 
Beyond Media Queries: Anatomy of an Adaptive Web Design
Beyond Media Queries: Anatomy of an Adaptive Web DesignBeyond Media Queries: Anatomy of an Adaptive Web Design
Beyond Media Queries: Anatomy of an Adaptive Web Design
 
CSS3, Media Queries, and Responsive Design
CSS3, Media Queries, and Responsive DesignCSS3, Media Queries, and Responsive Design
CSS3, Media Queries, and Responsive Design
 
More than Media Queries: Reframing Responsive UX - SXSW 2016
More than Media Queries: Reframing Responsive UX - SXSW 2016More than Media Queries: Reframing Responsive UX - SXSW 2016
More than Media Queries: Reframing Responsive UX - SXSW 2016
 
HTML Block and Inline Elements
HTML Block and Inline ElementsHTML Block and Inline Elements
HTML Block and Inline Elements
 
The future of media queries?
The future of media queries?The future of media queries?
The future of media queries?
 
The Future State of Layout
The Future State of LayoutThe Future State of Layout
The Future State of Layout
 
Maintainable CSS
Maintainable CSSMaintainable CSS
Maintainable CSS
 
CSS3 Media Queries
CSS3 Media QueriesCSS3 Media Queries
CSS3 Media Queries
 
Go With The Flow
Go With The FlowGo With The Flow
Go With The Flow
 
Social media and your website
Social media and your websiteSocial media and your website
Social media and your website
 

Similaire à Media queries

Introduction to CSS3
Introduction to CSS3Introduction to CSS3
Introduction to CSS3Doris Chen
 
Devon 2011-f-1 반응형 웹 디자인
Devon 2011-f-1  반응형 웹 디자인Devon 2011-f-1  반응형 웹 디자인
Devon 2011-f-1 반응형 웹 디자인Daum DNA
 
HTML5 and the dawn of rich mobile web applications pt 1
HTML5 and the dawn of rich mobile web applications pt 1HTML5 and the dawn of rich mobile web applications pt 1
HTML5 and the dawn of rich mobile web applications pt 1James Pearce
 
Responsive Web Design
Responsive Web DesignResponsive Web Design
Responsive Web DesignJason Harwig
 
Web Development for UX Designers
Web Development for UX DesignersWeb Development for UX Designers
Web Development for UX DesignersAshlimarie
 
Developing for Responsive Design - Frederic Welterlin
Developing for Responsive Design - Frederic WelterlinDeveloping for Responsive Design - Frederic Welterlin
Developing for Responsive Design - Frederic WelterlinRazorfish
 
TERMINALFOUR t44u 2009 - University of St Andrews Case Study
TERMINALFOUR t44u 2009 - University of St Andrews Case StudyTERMINALFOUR t44u 2009 - University of St Andrews Case Study
TERMINALFOUR t44u 2009 - University of St Andrews Case StudyTerminalfour
 
Every Web Developer is a Win8 developer
Every Web Developer is a Win8 developerEvery Web Developer is a Win8 developer
Every Web Developer is a Win8 developerKevin DeRudder
 
When worlds Collide: HTML5 Meets the Cloud
When worlds Collide: HTML5 Meets the CloudWhen worlds Collide: HTML5 Meets the Cloud
When worlds Collide: HTML5 Meets the CloudDavid Pallmann
 
Cross platform mobile web apps
Cross platform mobile web appsCross platform mobile web apps
Cross platform mobile web appsJames Pearce
 
Wordcamp Thessaloniki 2011 The Nextweb
Wordcamp Thessaloniki 2011 The NextwebWordcamp Thessaloniki 2011 The Nextweb
Wordcamp Thessaloniki 2011 The NextwebGeorge Kanellopoulos
 
HTML5 and CSS3 refresher
HTML5 and CSS3 refresherHTML5 and CSS3 refresher
HTML5 and CSS3 refresherIvano Malavolta
 
From Flash to Canvas - a penchant for black holes
From Flash to Canvas - a penchant for black holesFrom Flash to Canvas - a penchant for black holes
From Flash to Canvas - a penchant for black holesPatric Lanhed
 
Bd conf sencha touch workshop
Bd conf sencha touch workshopBd conf sencha touch workshop
Bd conf sencha touch workshopJames Pearce
 
HTML5: An Overview
HTML5: An OverviewHTML5: An Overview
HTML5: An OverviewNagendra Um
 
The Mobile Development Landscape
The Mobile Development LandscapeThe Mobile Development Landscape
The Mobile Development LandscapeAmbert Ho
 
The web as it should be
The web as it should beThe web as it should be
The web as it should bethebeebs
 
Responsive Web Design
Responsive Web DesignResponsive Web Design
Responsive Web DesignDebra Shapiro
 

Similaire à Media queries (20)

Introduction to CSS3
Introduction to CSS3Introduction to CSS3
Introduction to CSS3
 
Devon 2011-f-1 반응형 웹 디자인
Devon 2011-f-1  반응형 웹 디자인Devon 2011-f-1  반응형 웹 디자인
Devon 2011-f-1 반응형 웹 디자인
 
HTML5 and the dawn of rich mobile web applications pt 1
HTML5 and the dawn of rich mobile web applications pt 1HTML5 and the dawn of rich mobile web applications pt 1
HTML5 and the dawn of rich mobile web applications pt 1
 
Responsive Web Design
Responsive Web DesignResponsive Web Design
Responsive Web Design
 
Html5 more than just html5 v final
Html5  more than just html5 v finalHtml5  more than just html5 v final
Html5 more than just html5 v final
 
Web Development for UX Designers
Web Development for UX DesignersWeb Development for UX Designers
Web Development for UX Designers
 
Developing for Responsive Design - Frederic Welterlin
Developing for Responsive Design - Frederic WelterlinDeveloping for Responsive Design - Frederic Welterlin
Developing for Responsive Design - Frederic Welterlin
 
TERMINALFOUR t44u 2009 - University of St Andrews Case Study
TERMINALFOUR t44u 2009 - University of St Andrews Case StudyTERMINALFOUR t44u 2009 - University of St Andrews Case Study
TERMINALFOUR t44u 2009 - University of St Andrews Case Study
 
Every Web Developer is a Win8 developer
Every Web Developer is a Win8 developerEvery Web Developer is a Win8 developer
Every Web Developer is a Win8 developer
 
When worlds Collide: HTML5 Meets the Cloud
When worlds Collide: HTML5 Meets the CloudWhen worlds Collide: HTML5 Meets the Cloud
When worlds Collide: HTML5 Meets the Cloud
 
Cross platform mobile web apps
Cross platform mobile web appsCross platform mobile web apps
Cross platform mobile web apps
 
HTML5 - A Whirlwind tour
HTML5 - A Whirlwind tourHTML5 - A Whirlwind tour
HTML5 - A Whirlwind tour
 
Wordcamp Thessaloniki 2011 The Nextweb
Wordcamp Thessaloniki 2011 The NextwebWordcamp Thessaloniki 2011 The Nextweb
Wordcamp Thessaloniki 2011 The Nextweb
 
HTML5 and CSS3 refresher
HTML5 and CSS3 refresherHTML5 and CSS3 refresher
HTML5 and CSS3 refresher
 
From Flash to Canvas - a penchant for black holes
From Flash to Canvas - a penchant for black holesFrom Flash to Canvas - a penchant for black holes
From Flash to Canvas - a penchant for black holes
 
Bd conf sencha touch workshop
Bd conf sencha touch workshopBd conf sencha touch workshop
Bd conf sencha touch workshop
 
HTML5: An Overview
HTML5: An OverviewHTML5: An Overview
HTML5: An Overview
 
The Mobile Development Landscape
The Mobile Development LandscapeThe Mobile Development Landscape
The Mobile Development Landscape
 
The web as it should be
The web as it should beThe web as it should be
The web as it should be
 
Responsive Web Design
Responsive Web DesignResponsive Web Design
Responsive Web Design
 

Plus de Kevin DeRudder

Build your own Cloud/Home security system for 60$
Build your own Cloud/Home security system for 60$Build your own Cloud/Home security system for 60$
Build your own Cloud/Home security system for 60$Kevin DeRudder
 
Comparing xaml and html
Comparing xaml and htmlComparing xaml and html
Comparing xaml and htmlKevin DeRudder
 
VISUG: Visual studio for web developers
VISUG: Visual studio for web developersVISUG: Visual studio for web developers
VISUG: Visual studio for web developersKevin DeRudder
 
Testing apps with MTM and Tea Foundation Service
Testing apps with MTM and Tea Foundation ServiceTesting apps with MTM and Tea Foundation Service
Testing apps with MTM and Tea Foundation ServiceKevin DeRudder
 
ECMAScript.Next ECMAScipt 6
ECMAScript.Next ECMAScipt 6ECMAScript.Next ECMAScipt 6
ECMAScript.Next ECMAScipt 6Kevin DeRudder
 
Building cross platform applications using Windows Azure Mobile Services
Building cross platform applications using Windows Azure Mobile ServicesBuilding cross platform applications using Windows Azure Mobile Services
Building cross platform applications using Windows Azure Mobile ServicesKevin DeRudder
 
Use html5 to build what you want, where you want it
Use html5 to build what you want, where you want itUse html5 to build what you want, where you want it
Use html5 to build what you want, where you want itKevin DeRudder
 
Developers and Designers
Developers and DesignersDevelopers and Designers
Developers and DesignersKevin DeRudder
 
What you need to know bout html5
What you need to know bout html5What you need to know bout html5
What you need to know bout html5Kevin DeRudder
 

Plus de Kevin DeRudder (12)

Build your own Cloud/Home security system for 60$
Build your own Cloud/Home security system for 60$Build your own Cloud/Home security system for 60$
Build your own Cloud/Home security system for 60$
 
Comparing xaml and html
Comparing xaml and htmlComparing xaml and html
Comparing xaml and html
 
ECMASCRIPT.NEXT
ECMASCRIPT.NEXTECMASCRIPT.NEXT
ECMASCRIPT.NEXT
 
VISUG: Visual studio for web developers
VISUG: Visual studio for web developersVISUG: Visual studio for web developers
VISUG: Visual studio for web developers
 
Testing apps with MTM and Tea Foundation Service
Testing apps with MTM and Tea Foundation ServiceTesting apps with MTM and Tea Foundation Service
Testing apps with MTM and Tea Foundation Service
 
ECMAScript.Next ECMAScipt 6
ECMAScript.Next ECMAScipt 6ECMAScript.Next ECMAScipt 6
ECMAScript.Next ECMAScipt 6
 
Building cross platform applications using Windows Azure Mobile Services
Building cross platform applications using Windows Azure Mobile ServicesBuilding cross platform applications using Windows Azure Mobile Services
Building cross platform applications using Windows Azure Mobile Services
 
Responsive SharePoint
Responsive SharePointResponsive SharePoint
Responsive SharePoint
 
Use html5 to build what you want, where you want it
Use html5 to build what you want, where you want itUse html5 to build what you want, where you want it
Use html5 to build what you want, where you want it
 
Developers and Designers
Developers and DesignersDevelopers and Designers
Developers and Designers
 
What you need to know bout html5
What you need to know bout html5What you need to know bout html5
What you need to know bout html5
 
Html5 intro
Html5 introHtml5 intro
Html5 intro
 

Dernier

办理卡尔顿大学毕业证成绩单|购买加拿大文凭证书
办理卡尔顿大学毕业证成绩单|购买加拿大文凭证书办理卡尔顿大学毕业证成绩单|购买加拿大文凭证书
办理卡尔顿大学毕业证成绩单|购买加拿大文凭证书zdzoqco
 
Call Girls in Ashok Nagar Delhi ✡️9711147426✡️ Escorts Service
Call Girls in Ashok Nagar Delhi ✡️9711147426✡️ Escorts ServiceCall Girls in Ashok Nagar Delhi ✡️9711147426✡️ Escorts Service
Call Girls in Ashok Nagar Delhi ✡️9711147426✡️ Escorts Servicejennyeacort
 
Business research proposal mcdo.pptxBusiness research proposal mcdo.pptxBusin...
Business research proposal mcdo.pptxBusiness research proposal mcdo.pptxBusin...Business research proposal mcdo.pptxBusiness research proposal mcdo.pptxBusin...
Business research proposal mcdo.pptxBusiness research proposal mcdo.pptxBusin...mrchrns005
 
办理(USYD毕业证书)澳洲悉尼大学毕业证成绩单原版一比一
办理(USYD毕业证书)澳洲悉尼大学毕业证成绩单原版一比一办理(USYD毕业证书)澳洲悉尼大学毕业证成绩单原版一比一
办理(USYD毕业证书)澳洲悉尼大学毕业证成绩单原版一比一diploma 1
 
Call Girls Aslali 7397865700 Ridhima Hire Me Full Night
Call Girls Aslali 7397865700 Ridhima Hire Me Full NightCall Girls Aslali 7397865700 Ridhima Hire Me Full Night
Call Girls Aslali 7397865700 Ridhima Hire Me Full Nightssuser7cb4ff
 
办理学位证(TheAuckland证书)新西兰奥克兰大学毕业证成绩单原版一比一
办理学位证(TheAuckland证书)新西兰奥克兰大学毕业证成绩单原版一比一办理学位证(TheAuckland证书)新西兰奥克兰大学毕业证成绩单原版一比一
办理学位证(TheAuckland证书)新西兰奥克兰大学毕业证成绩单原版一比一Fi L
 
shot list for my tv series two steps back
shot list for my tv series two steps backshot list for my tv series two steps back
shot list for my tv series two steps back17lcow074
 
Architecture case study India Habitat Centre, Delhi.pdf
Architecture case study India Habitat Centre, Delhi.pdfArchitecture case study India Habitat Centre, Delhi.pdf
Architecture case study India Habitat Centre, Delhi.pdfSumit Lathwal
 
毕业文凭制作#回国入职#diploma#degree澳洲弗林德斯大学毕业证成绩单pdf电子版制作修改#毕业文凭制作#回国入职#diploma#degree
毕业文凭制作#回国入职#diploma#degree澳洲弗林德斯大学毕业证成绩单pdf电子版制作修改#毕业文凭制作#回国入职#diploma#degree 毕业文凭制作#回国入职#diploma#degree澳洲弗林德斯大学毕业证成绩单pdf电子版制作修改#毕业文凭制作#回国入职#diploma#degree
毕业文凭制作#回国入职#diploma#degree澳洲弗林德斯大学毕业证成绩单pdf电子版制作修改#毕业文凭制作#回国入职#diploma#degree ttt fff
 
办理学位证(SFU证书)西蒙菲莎大学毕业证成绩单原版一比一
办理学位证(SFU证书)西蒙菲莎大学毕业证成绩单原版一比一办理学位证(SFU证书)西蒙菲莎大学毕业证成绩单原版一比一
办理学位证(SFU证书)西蒙菲莎大学毕业证成绩单原版一比一F dds
 
韩国SKKU学位证,成均馆大学毕业证书1:1制作
韩国SKKU学位证,成均馆大学毕业证书1:1制作韩国SKKU学位证,成均馆大学毕业证书1:1制作
韩国SKKU学位证,成均馆大学毕业证书1:1制作7tz4rjpd
 
FiveHypotheses_UIDMasterclass_18April2024.pdf
FiveHypotheses_UIDMasterclass_18April2024.pdfFiveHypotheses_UIDMasterclass_18April2024.pdf
FiveHypotheses_UIDMasterclass_18April2024.pdfShivakumar Viswanathan
 
在线办理ohio毕业证俄亥俄大学毕业证成绩单留信学历认证
在线办理ohio毕业证俄亥俄大学毕业证成绩单留信学历认证在线办理ohio毕业证俄亥俄大学毕业证成绩单留信学历认证
在线办理ohio毕业证俄亥俄大学毕业证成绩单留信学历认证nhjeo1gg
 
How to Empower the future of UX Design with Gen AI
How to Empower the future of UX Design with Gen AIHow to Empower the future of UX Design with Gen AI
How to Empower the future of UX Design with Gen AIyuj
 
Untitled presedddddddddddddddddntation (1).pptx
Untitled presedddddddddddddddddntation (1).pptxUntitled presedddddddddddddddddntation (1).pptx
Untitled presedddddddddddddddddntation (1).pptxmapanig881
 
原版1:1定制堪培拉大学毕业证(UC毕业证)#文凭成绩单#真实留信学历认证永久存档
原版1:1定制堪培拉大学毕业证(UC毕业证)#文凭成绩单#真实留信学历认证永久存档原版1:1定制堪培拉大学毕业证(UC毕业证)#文凭成绩单#真实留信学历认证永久存档
原版1:1定制堪培拉大学毕业证(UC毕业证)#文凭成绩单#真实留信学历认证永久存档208367051
 
Passbook project document_april_21__.pdf
Passbook project document_april_21__.pdfPassbook project document_april_21__.pdf
Passbook project document_april_21__.pdfvaibhavkanaujia
 
西北大学毕业证学位证成绩单-怎么样办伪造
西北大学毕业证学位证成绩单-怎么样办伪造西北大学毕业证学位证成绩单-怎么样办伪造
西北大学毕业证学位证成绩单-怎么样办伪造kbdhl05e
 
Call Us ✡️97111⇛47426⇛Call In girls Vasant Vihar༒(Delhi)
Call Us ✡️97111⇛47426⇛Call In girls Vasant Vihar༒(Delhi)Call Us ✡️97111⇛47426⇛Call In girls Vasant Vihar༒(Delhi)
Call Us ✡️97111⇛47426⇛Call In girls Vasant Vihar༒(Delhi)jennyeacort
 

Dernier (20)

Call Girls in Pratap Nagar, 9953056974 Escort Service
Call Girls in Pratap Nagar,  9953056974 Escort ServiceCall Girls in Pratap Nagar,  9953056974 Escort Service
Call Girls in Pratap Nagar, 9953056974 Escort Service
 
办理卡尔顿大学毕业证成绩单|购买加拿大文凭证书
办理卡尔顿大学毕业证成绩单|购买加拿大文凭证书办理卡尔顿大学毕业证成绩单|购买加拿大文凭证书
办理卡尔顿大学毕业证成绩单|购买加拿大文凭证书
 
Call Girls in Ashok Nagar Delhi ✡️9711147426✡️ Escorts Service
Call Girls in Ashok Nagar Delhi ✡️9711147426✡️ Escorts ServiceCall Girls in Ashok Nagar Delhi ✡️9711147426✡️ Escorts Service
Call Girls in Ashok Nagar Delhi ✡️9711147426✡️ Escorts Service
 
Business research proposal mcdo.pptxBusiness research proposal mcdo.pptxBusin...
Business research proposal mcdo.pptxBusiness research proposal mcdo.pptxBusin...Business research proposal mcdo.pptxBusiness research proposal mcdo.pptxBusin...
Business research proposal mcdo.pptxBusiness research proposal mcdo.pptxBusin...
 
办理(USYD毕业证书)澳洲悉尼大学毕业证成绩单原版一比一
办理(USYD毕业证书)澳洲悉尼大学毕业证成绩单原版一比一办理(USYD毕业证书)澳洲悉尼大学毕业证成绩单原版一比一
办理(USYD毕业证书)澳洲悉尼大学毕业证成绩单原版一比一
 
Call Girls Aslali 7397865700 Ridhima Hire Me Full Night
Call Girls Aslali 7397865700 Ridhima Hire Me Full NightCall Girls Aslali 7397865700 Ridhima Hire Me Full Night
Call Girls Aslali 7397865700 Ridhima Hire Me Full Night
 
办理学位证(TheAuckland证书)新西兰奥克兰大学毕业证成绩单原版一比一
办理学位证(TheAuckland证书)新西兰奥克兰大学毕业证成绩单原版一比一办理学位证(TheAuckland证书)新西兰奥克兰大学毕业证成绩单原版一比一
办理学位证(TheAuckland证书)新西兰奥克兰大学毕业证成绩单原版一比一
 
shot list for my tv series two steps back
shot list for my tv series two steps backshot list for my tv series two steps back
shot list for my tv series two steps back
 
Architecture case study India Habitat Centre, Delhi.pdf
Architecture case study India Habitat Centre, Delhi.pdfArchitecture case study India Habitat Centre, Delhi.pdf
Architecture case study India Habitat Centre, Delhi.pdf
 
毕业文凭制作#回国入职#diploma#degree澳洲弗林德斯大学毕业证成绩单pdf电子版制作修改#毕业文凭制作#回国入职#diploma#degree
毕业文凭制作#回国入职#diploma#degree澳洲弗林德斯大学毕业证成绩单pdf电子版制作修改#毕业文凭制作#回国入职#diploma#degree 毕业文凭制作#回国入职#diploma#degree澳洲弗林德斯大学毕业证成绩单pdf电子版制作修改#毕业文凭制作#回国入职#diploma#degree
毕业文凭制作#回国入职#diploma#degree澳洲弗林德斯大学毕业证成绩单pdf电子版制作修改#毕业文凭制作#回国入职#diploma#degree
 
办理学位证(SFU证书)西蒙菲莎大学毕业证成绩单原版一比一
办理学位证(SFU证书)西蒙菲莎大学毕业证成绩单原版一比一办理学位证(SFU证书)西蒙菲莎大学毕业证成绩单原版一比一
办理学位证(SFU证书)西蒙菲莎大学毕业证成绩单原版一比一
 
韩国SKKU学位证,成均馆大学毕业证书1:1制作
韩国SKKU学位证,成均馆大学毕业证书1:1制作韩国SKKU学位证,成均馆大学毕业证书1:1制作
韩国SKKU学位证,成均馆大学毕业证书1:1制作
 
FiveHypotheses_UIDMasterclass_18April2024.pdf
FiveHypotheses_UIDMasterclass_18April2024.pdfFiveHypotheses_UIDMasterclass_18April2024.pdf
FiveHypotheses_UIDMasterclass_18April2024.pdf
 
在线办理ohio毕业证俄亥俄大学毕业证成绩单留信学历认证
在线办理ohio毕业证俄亥俄大学毕业证成绩单留信学历认证在线办理ohio毕业证俄亥俄大学毕业证成绩单留信学历认证
在线办理ohio毕业证俄亥俄大学毕业证成绩单留信学历认证
 
How to Empower the future of UX Design with Gen AI
How to Empower the future of UX Design with Gen AIHow to Empower the future of UX Design with Gen AI
How to Empower the future of UX Design with Gen AI
 
Untitled presedddddddddddddddddntation (1).pptx
Untitled presedddddddddddddddddntation (1).pptxUntitled presedddddddddddddddddntation (1).pptx
Untitled presedddddddddddddddddntation (1).pptx
 
原版1:1定制堪培拉大学毕业证(UC毕业证)#文凭成绩单#真实留信学历认证永久存档
原版1:1定制堪培拉大学毕业证(UC毕业证)#文凭成绩单#真实留信学历认证永久存档原版1:1定制堪培拉大学毕业证(UC毕业证)#文凭成绩单#真实留信学历认证永久存档
原版1:1定制堪培拉大学毕业证(UC毕业证)#文凭成绩单#真实留信学历认证永久存档
 
Passbook project document_april_21__.pdf
Passbook project document_april_21__.pdfPassbook project document_april_21__.pdf
Passbook project document_april_21__.pdf
 
西北大学毕业证学位证成绩单-怎么样办伪造
西北大学毕业证学位证成绩单-怎么样办伪造西北大学毕业证学位证成绩单-怎么样办伪造
西北大学毕业证学位证成绩单-怎么样办伪造
 
Call Us ✡️97111⇛47426⇛Call In girls Vasant Vihar༒(Delhi)
Call Us ✡️97111⇛47426⇛Call In girls Vasant Vihar༒(Delhi)Call Us ✡️97111⇛47426⇛Call In girls Vasant Vihar༒(Delhi)
Call Us ✡️97111⇛47426⇛Call In girls Vasant Vihar༒(Delhi)
 

Media queries

  • 1. USING MEDIA QUERIES to build Mobile Web Applications
  • 2. @kevinderudder working for eGuidelines and a lecturer at the Technical University of West Flanders. Contact me on kevin@e-guidelines.be
  • 3.
  • 4. Website on a desktop Website on a mobile phone
  • 5.
  • 6.
  • 7. Agenda • Why this topic • Native vs Web apps • Responsive Design • HTML5 and CSS3 to the rescue • Usefull HTML5 Tags • Media Queries
  • 10.
  • 11.
  • 12. As a web developer you should target multiple (all) devices
  • 14. Native Development • Windows Metro Applications • XAML with C#, VB.NET or C++ • HTML with JavaScript • iOS apps • Objective C • Android • Java
  • 15. HTML5 and CSS3 to the rescue
  • 16. = CONTENT = UI
  • 17.
  • 18. HTML5 Structure Indexed DB File APIs Forms Audio and History Web Workers XHR2 Video Navigation ... Drag and Canvas WebSockets Messaging Drop Server-Sent Web Storage Offline Geolocation Events
  • 19. HTML5 Structure Indexed DB File APIs Forms Audio and History Web Workers XHR2 Video Navigation ... Drag and Canvas WebSockets Messaging Drop Server-Sent Web Storage Offline Geolocation Events
  • 20. CSS3 Rounded Colors Box Shadow Text Effects Corners HSL, HSLA Multi-column Box Model Web Fonts Borders layout Media Attribute Background Selectors Queries matching
  • 21. CSS3 Rounded Colors Box Shadow Text Effects Corners HSL, HSLA Multi-column Box Model Web Fonts Borders layout Media Attribute Background Selectors Queries matching
  • 22.
  • 23.
  • 24.
  • 25.
  • 26. Let’s get started and change that MVC site into a cross platform/device web application
  • 27. Before you even think about designing CONTENT IS KING
  • 28.
  • 29.
  • 30. How do you point to the specific content??
  • 31. <div id=“header”> <div id=“top” />... <div id=“navigation”> <div id=“menu”>... <div id=“main”> <div class=“content”> <div id=“left”> <div class=“content”> <div id=“footer”>
  • 32. <header> <nav> <section> <article> <aside> <article> <footer>
  • 33.
  • 34. <header /> <nav /> <article /> <section /> <aside /> <footer />
  • 35. <header /> <nav /> <section /> <aside /> <article />
  • 36. DEMO
  • 37. <header /> <nav /> <article /> <section /> <aside /> <footer />
  • 39. How are you gonna serve the page to the device 1. Redirect 2. Responsive design via Media Queries
  • 40. How are you gonna serve the page to the device 1. Redirect 2. Responsive design via Media Queries
  • 41. <script type="text/javascript"> if (screen.width <= 320) { document.location = "m.microsoft.com"; } </script>
  • 42.
  • 43.
  • 44.
  • 45. This is good, if you want to deliver different content
  • 46.
  • 47.
  • 48. But, do you create a custom experience for each (new) browser or device
  • 49. How are you gonna serve the page to the device 1. Redirect 2. Responsive design via Media Queries
  • 50. What does it mean: RESPONSIVE
  • 51. Pictures of M. vatia
  • 52. Pictures of M. vatia
  • 53.
  • 54.
  • 55.
  • 56.
  • 57. If you want to make your web app responsive, you should implement 3 ingredients • A flexible, grid-based layout • Flexible images and media • Media Queries
  • 58.
  • 59. We will only focus on Media Queries
  • 60.
  • 61.
  • 62.
  • 63. Media Queries allow you write design code based on the characteristics of a device
  • 64. Media Queries exists out of 2 parts MEDIA QUERY Type Query or Expression @media all and (max-width: 640px) { }
  • 65. Media Queries exists out of 2 parts 1. Media Type 2. Expression
  • 67.
  • 69. The media types Taken from the W3C site All Suitable for all devices Braille Intended for braille tactile feedback devices Embossed Intended for paged braille printers Handheld Intended for handheld devices Print Intended for paged material Projection Intended for projected presentations Screen Intended primarily for color computer screens Speech Inteded for speech synthesizers Tty Media using a fixed character grid Tv Intended for television-type devices
  • 70. AHA, there is something like handheld
  • 71. @media screen { body { background-color: Red; } } @media handheld { body { background-color: Yellow; } } This is not yellow
  • 72. Old devices didn’t have capable browsers
  • 73. Modern mobile devices use screen as media type
  • 74. Media Queries exists out of 2 parts 1. Media Type 2. Expression
  • 75. MEDIA QUERY Type Query or Expression @media all and (max-width: 640px) { Feature Value }
  • 76. The Features Features with min- and max- prefixes • Width • Aspect-ratio • Height • Device-aspect-ratio • Device-width • Color • Device-height • Color-index • Resolution • Monochrome
  • 77. The Features Features without min- and max- prefixes • Orientation • Scan • Grid
  • 78. 3 Ways to implement Media Queries 1. 2. 3.
  • 82. NOT
  • 83. DEMO
  • 85.
  • 86.
  • 87.