SlideShare une entreprise Scribd logo
1  sur  14
Media Queries
Presented by,
Midhun . L. Madhu
What are Media Queries?
• Allows us to change our layouts to suit the exact need of different devices
without changing the content.
• It is applied with the help of CSS3.
• Media queries are CSS extensions to media types that give us more control
over rendering across different devices.
• Media query is a logical expression which is either true or false.
• CSS associated with media query is only applied if the expression is true.
What are Media Types?
• CSS can be used to specify how a document is presented in different media
• There are ten media types defined in CSS
–

all : suitable for all devices.

–

handheld : for handheld devices.

–

screen : for color computer screens.

–

tv : for television type devices.

–

aural : for speech synthesizer.

–

braille : for braille tactile feed back devices.

–

embossed : for paged braille printers.

–

projection : for projected presentations .

–

tty : for teletypes and terminals.

–

print : for print material.
Methods to specify Media for CSS
• First method:
– You can use a <link> element in the head of your HTML document to
specify the target media of an external style sheet.
Example:
<link rel=“stylesheet” href=“a.css” type=“type/css” media=“screen”/>

• Second method:
– You can use a <?xml-stylesheetl?> element in the head of your XML
document to specify the target media of an external style sheet.
Example:
<?xml-stylesheet media=“screen” rel=“stylesheet” href=“example.css”?>
Methods to specify Media for CSS
• Third method:
– You can specify the target medium within a CSS file using @media
Example:
@media screen
{
body{color:blue;}
}
Media Query Syntax
<style>
@media screen and (color)
{
body{color:blue;}
}
</style>
Media type

keyword

Media feature
Media Feature List
Types Of Keywords
• and:
– You can use multiple expressions in a media query if you join them
with “and “ keyword.
E.g.:
<style>
@media screen and (minwidth:200px) and (max-width:600px)
{
body{color:blue;}
}
</style>
Types Of Keywords
• Comma Separated:
– You can use multiple, comma-separated media queries.
– This comma act like an “or” keyword.
E.g.:
<style>
@media screen and (minwidth:200px) or (max-width:600px)
{
body{color:blue;}
}
</style>
Types Of Keywords
• not:
– You can use the not keyword in a media query if you want your CSS to
be ignored by a specific device.
E.g.:
<style>
@media not screen and (minwidth:200px)
{
body{color:blue;}
}
</style>
Types Of Keywords
• only:
– You can use the only keyword in a media query if you want your CSS to
be applied only to a specific device.
E.g.:
<style>
@media only screen and (minwidth:200px)
{
body{color:blue;}
}
</style>
Targeting iPhone
• iPhone does not support hand held media type.
• Apple recommends targeting the iPhone using media queries.
E.g.:
<style type=“text/css”>
@media screen and (max-width:480px)
{
body{color:magenta;}
}
</style>
Browser Support for Media Queries
QUERIES??

Contenu connexe

Tendances

Deep dive into sass
Deep dive into sassDeep dive into sass
Deep dive into sassKnoldus Inc.
 
Introduction to Javascript
Introduction to JavascriptIntroduction to Javascript
Introduction to JavascriptSeble Nigussie
 
Intro to Flexbox - A Magical CSS Property
Intro to Flexbox - A Magical CSS PropertyIntro to Flexbox - A Magical CSS Property
Intro to Flexbox - A Magical CSS PropertyAdam Soucie
 
CSS Flexbox (flexible box layout)
CSS Flexbox (flexible box layout)CSS Flexbox (flexible box layout)
CSS Flexbox (flexible box layout)Woodridge Software
 
CSS3, Media Queries, and Responsive Design
CSS3, Media Queries, and Responsive DesignCSS3, Media Queries, and Responsive Design
CSS3, Media Queries, and Responsive DesignZoe Gillenwater
 
Dynamic CSS: Transforms, Transitions, and Animation Basics
Dynamic CSS: Transforms, Transitions, and Animation BasicsDynamic CSS: Transforms, Transitions, and Animation Basics
Dynamic CSS: Transforms, Transitions, and Animation BasicsBeth Soderberg
 
Complete Lecture on Css presentation
Complete Lecture on Css presentation Complete Lecture on Css presentation
Complete Lecture on Css presentation Salman Memon
 
Bootstrap Part - 1
Bootstrap Part - 1Bootstrap Part - 1
Bootstrap Part - 1EPAM Systems
 
Introduction to flexbox
Introduction  to  flexboxIntroduction  to  flexbox
Introduction to flexboxJyoti Gautam
 
Introduction to Cascading Style Sheets (CSS)
Introduction to Cascading Style Sheets (CSS)Introduction to Cascading Style Sheets (CSS)
Introduction to Cascading Style Sheets (CSS)Chris Poteet
 
Introduction to SASS
Introduction to SASSIntroduction to SASS
Introduction to SASSJon Dean
 

Tendances (20)

Bootstrap 3
Bootstrap 3Bootstrap 3
Bootstrap 3
 
Deep dive into sass
Deep dive into sassDeep dive into sass
Deep dive into sass
 
Introduction to HTML and CSS
Introduction to HTML and CSSIntroduction to HTML and CSS
Introduction to HTML and CSS
 
Introduction to Javascript
Introduction to JavascriptIntroduction to Javascript
Introduction to Javascript
 
Intro to Flexbox - A Magical CSS Property
Intro to Flexbox - A Magical CSS PropertyIntro to Flexbox - A Magical CSS Property
Intro to Flexbox - A Magical CSS Property
 
CSS Flexbox (flexible box layout)
CSS Flexbox (flexible box layout)CSS Flexbox (flexible box layout)
CSS Flexbox (flexible box layout)
 
Basic-CSS-tutorial
Basic-CSS-tutorialBasic-CSS-tutorial
Basic-CSS-tutorial
 
CSS3, Media Queries, and Responsive Design
CSS3, Media Queries, and Responsive DesignCSS3, Media Queries, and Responsive Design
CSS3, Media Queries, and Responsive Design
 
Introduction to CSS3
Introduction to CSS3Introduction to CSS3
Introduction to CSS3
 
Css
CssCss
Css
 
Dynamic CSS: Transforms, Transitions, and Animation Basics
Dynamic CSS: Transforms, Transitions, and Animation BasicsDynamic CSS: Transforms, Transitions, and Animation Basics
Dynamic CSS: Transforms, Transitions, and Animation Basics
 
CSS
CSSCSS
CSS
 
Complete Lecture on Css presentation
Complete Lecture on Css presentation Complete Lecture on Css presentation
Complete Lecture on Css presentation
 
Bootstrap Part - 1
Bootstrap Part - 1Bootstrap Part - 1
Bootstrap Part - 1
 
Introduction to flexbox
Introduction  to  flexboxIntroduction  to  flexbox
Introduction to flexbox
 
CSS
CSSCSS
CSS
 
Introduction to Cascading Style Sheets (CSS)
Introduction to Cascading Style Sheets (CSS)Introduction to Cascading Style Sheets (CSS)
Introduction to Cascading Style Sheets (CSS)
 
Bootstrap [part 1]
Bootstrap [part 1]Bootstrap [part 1]
Bootstrap [part 1]
 
Introduction to SASS
Introduction to SASSIntroduction to SASS
Introduction to SASS
 
HTML5 Canvas
HTML5 CanvasHTML5 Canvas
HTML5 Canvas
 

En vedette

S4 tarea4 caheg
S4 tarea4 cahegS4 tarea4 caheg
S4 tarea4 cahegLUPITA_66
 
Actividad3 infopedagogía-reyes-marcelo
Actividad3 infopedagogía-reyes-marceloActividad3 infopedagogía-reyes-marcelo
Actividad3 infopedagogía-reyes-marceloSci Chaco
 
грицько бойко геніальний український письменник
грицько бойко геніальний український письменникгрицько бойко геніальний український письменник
грицько бойко геніальний український письменникtruvativ
 
astocha ppt 1. pengantar konsep integral
astocha ppt 1. pengantar konsep integralastocha ppt 1. pengantar konsep integral
astocha ppt 1. pengantar konsep integralSMKN 2 Kediri
 
CINEC represent Sri Lanka in IORA project in Australia revised
CINEC represent Sri Lanka in IORA project in Australia revised CINEC represent Sri Lanka in IORA project in Australia revised
CINEC represent Sri Lanka in IORA project in Australia revised CINEC Campus
 
AUTOMATED MODEL FOR IMPLEMENTATION OF UNIFIED CRITERIA FOR FLOOD RISK CLASSIF...
AUTOMATED MODEL FOR IMPLEMENTATION OF UNIFIED CRITERIA FOR FLOOD RISK CLASSIF...AUTOMATED MODEL FOR IMPLEMENTATION OF UNIFIED CRITERIA FOR FLOOD RISK CLASSIF...
AUTOMATED MODEL FOR IMPLEMENTATION OF UNIFIED CRITERIA FOR FLOOD RISK CLASSIF...Lyubomir Filipov
 
Some samr modell
Some samr modellSome samr modell
Some samr modellhkerm
 
обогреваемое стекло Print
обогреваемое стекло Printобогреваемое стекло Print
обогреваемое стекло Printpic-g
 
итд
итдитд
итдpic-g
 

En vedette (11)

S4 tarea4 caheg
S4 tarea4 cahegS4 tarea4 caheg
S4 tarea4 caheg
 
TREB Housing Market Charts - November 2015
TREB Housing Market Charts - November 2015TREB Housing Market Charts - November 2015
TREB Housing Market Charts - November 2015
 
Actividad3 infopedagogía-reyes-marcelo
Actividad3 infopedagogía-reyes-marceloActividad3 infopedagogía-reyes-marcelo
Actividad3 infopedagogía-reyes-marcelo
 
грицько бойко геніальний український письменник
грицько бойко геніальний український письменникгрицько бойко геніальний український письменник
грицько бойко геніальний український письменник
 
astocha ppt 1. pengantar konsep integral
astocha ppt 1. pengantar konsep integralastocha ppt 1. pengantar konsep integral
astocha ppt 1. pengantar konsep integral
 
CINEC represent Sri Lanka in IORA project in Australia revised
CINEC represent Sri Lanka in IORA project in Australia revised CINEC represent Sri Lanka in IORA project in Australia revised
CINEC represent Sri Lanka in IORA project in Australia revised
 
AUTOMATED MODEL FOR IMPLEMENTATION OF UNIFIED CRITERIA FOR FLOOD RISK CLASSIF...
AUTOMATED MODEL FOR IMPLEMENTATION OF UNIFIED CRITERIA FOR FLOOD RISK CLASSIF...AUTOMATED MODEL FOR IMPLEMENTATION OF UNIFIED CRITERIA FOR FLOOD RISK CLASSIF...
AUTOMATED MODEL FOR IMPLEMENTATION OF UNIFIED CRITERIA FOR FLOOD RISK CLASSIF...
 
Org (1)
Org (1)Org (1)
Org (1)
 
Some samr modell
Some samr modellSome samr modell
Some samr modell
 
обогреваемое стекло Print
обогреваемое стекло Printобогреваемое стекло Print
обогреваемое стекло Print
 
итд
итдитд
итд
 

Similaire à Mediaqueries (20)

Web Programming
Web ProgrammingWeb Programming
Web Programming
 
CSS media types
CSS media typesCSS media types
CSS media types
 
Print CSS
Print CSSPrint CSS
Print CSS
 
Css
CssCss
Css
 
Chapter 17: Responsive Web Design
Chapter 17: Responsive Web DesignChapter 17: Responsive Web Design
Chapter 17: Responsive Web Design
 
Webpage style with CSS
Webpage style with CSSWebpage style with CSS
Webpage style with CSS
 
HTML5, CSS3 & Responsive Design
HTML5, CSS3 & Responsive DesignHTML5, CSS3 & Responsive Design
HTML5, CSS3 & Responsive Design
 
Cordova training - Day 2 Introduction to CSS 3
Cordova training - Day 2 Introduction to CSS 3Cordova training - Day 2 Introduction to CSS 3
Cordova training - Day 2 Introduction to CSS 3
 
Responsive Web Design & APEX Theme 25
Responsive Web Design & APEX Theme 25Responsive Web Design & APEX Theme 25
Responsive Web Design & APEX Theme 25
 
Introduction to Responsive Web Design
Introduction to Responsive Web DesignIntroduction to Responsive Web Design
Introduction to Responsive Web Design
 
Styles.docx
Styles.docxStyles.docx
Styles.docx
 
Styles.docx
Styles.docxStyles.docx
Styles.docx
 
Styles.docx
Styles.docxStyles.docx
Styles.docx
 
Styles1.docx
Styles1.docxStyles1.docx
Styles1.docx
 
Pfnp slides
Pfnp slidesPfnp slides
Pfnp slides
 
css-tutorial
css-tutorialcss-tutorial
css-tutorial
 
css-tutorial
css-tutorialcss-tutorial
css-tutorial
 
CSS-3 Course Slide
CSS-3 Course SlideCSS-3 Course Slide
CSS-3 Course Slide
 
Css training tutorial css3 &amp; css4 essentials
Css training tutorial css3 &amp; css4 essentialsCss training tutorial css3 &amp; css4 essentials
Css training tutorial css3 &amp; css4 essentials
 
WEB DEVELOPMENT
WEB DEVELOPMENTWEB DEVELOPMENT
WEB DEVELOPMENT
 

Dernier

GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTS
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTSGRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTS
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTSJoshuaGantuangco2
 
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdf
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdfInclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdf
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdfTechSoup
 
Field Attribute Index Feature in Odoo 17
Field Attribute Index Feature in Odoo 17Field Attribute Index Feature in Odoo 17
Field Attribute Index Feature in Odoo 17Celine George
 
Science 7 Quarter 4 Module 2: Natural Resources.pptx
Science 7 Quarter 4 Module 2: Natural Resources.pptxScience 7 Quarter 4 Module 2: Natural Resources.pptx
Science 7 Quarter 4 Module 2: Natural Resources.pptxMaryGraceBautista27
 
Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Celine George
 
Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17Celine George
 
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATIONTHEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATIONHumphrey A Beña
 
4.18.24 Movement Legacies, Reflection, and Review.pptx
4.18.24 Movement Legacies, Reflection, and Review.pptx4.18.24 Movement Legacies, Reflection, and Review.pptx
4.18.24 Movement Legacies, Reflection, and Review.pptxmary850239
 
Earth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatEarth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatYousafMalik24
 
ANG SEKTOR NG agrikultura.pptx QUARTER 4
ANG SEKTOR NG agrikultura.pptx QUARTER 4ANG SEKTOR NG agrikultura.pptx QUARTER 4
ANG SEKTOR NG agrikultura.pptx QUARTER 4MiaBumagat1
 
ACC 2024 Chronicles. Cardiology. Exam.pdf
ACC 2024 Chronicles. Cardiology. Exam.pdfACC 2024 Chronicles. Cardiology. Exam.pdf
ACC 2024 Chronicles. Cardiology. Exam.pdfSpandanaRallapalli
 
How to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERPHow to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERPCeline George
 
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)lakshayb543
 
Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...Jisc
 
Gas measurement O2,Co2,& ph) 04/2024.pptx
Gas measurement O2,Co2,& ph) 04/2024.pptxGas measurement O2,Co2,& ph) 04/2024.pptx
Gas measurement O2,Co2,& ph) 04/2024.pptxDr.Ibrahim Hassaan
 

Dernier (20)

GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTS
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTSGRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTS
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTS
 
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdf
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdfInclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdf
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdf
 
Field Attribute Index Feature in Odoo 17
Field Attribute Index Feature in Odoo 17Field Attribute Index Feature in Odoo 17
Field Attribute Index Feature in Odoo 17
 
Science 7 Quarter 4 Module 2: Natural Resources.pptx
Science 7 Quarter 4 Module 2: Natural Resources.pptxScience 7 Quarter 4 Module 2: Natural Resources.pptx
Science 7 Quarter 4 Module 2: Natural Resources.pptx
 
Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17
 
Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17
 
OS-operating systems- ch04 (Threads) ...
OS-operating systems- ch04 (Threads) ...OS-operating systems- ch04 (Threads) ...
OS-operating systems- ch04 (Threads) ...
 
LEFT_ON_C'N_ PRELIMS_EL_DORADO_2024.pptx
LEFT_ON_C'N_ PRELIMS_EL_DORADO_2024.pptxLEFT_ON_C'N_ PRELIMS_EL_DORADO_2024.pptx
LEFT_ON_C'N_ PRELIMS_EL_DORADO_2024.pptx
 
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATIONTHEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
 
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
 
4.18.24 Movement Legacies, Reflection, and Review.pptx
4.18.24 Movement Legacies, Reflection, and Review.pptx4.18.24 Movement Legacies, Reflection, and Review.pptx
4.18.24 Movement Legacies, Reflection, and Review.pptx
 
Earth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatEarth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice great
 
ANG SEKTOR NG agrikultura.pptx QUARTER 4
ANG SEKTOR NG agrikultura.pptx QUARTER 4ANG SEKTOR NG agrikultura.pptx QUARTER 4
ANG SEKTOR NG agrikultura.pptx QUARTER 4
 
ACC 2024 Chronicles. Cardiology. Exam.pdf
ACC 2024 Chronicles. Cardiology. Exam.pdfACC 2024 Chronicles. Cardiology. Exam.pdf
ACC 2024 Chronicles. Cardiology. Exam.pdf
 
How to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERPHow to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERP
 
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
 
Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...
 
FINALS_OF_LEFT_ON_C'N_EL_DORADO_2024.pptx
FINALS_OF_LEFT_ON_C'N_EL_DORADO_2024.pptxFINALS_OF_LEFT_ON_C'N_EL_DORADO_2024.pptx
FINALS_OF_LEFT_ON_C'N_EL_DORADO_2024.pptx
 
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdfTataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
 
Gas measurement O2,Co2,& ph) 04/2024.pptx
Gas measurement O2,Co2,& ph) 04/2024.pptxGas measurement O2,Co2,& ph) 04/2024.pptx
Gas measurement O2,Co2,& ph) 04/2024.pptx
 

Mediaqueries

  • 2. What are Media Queries? • Allows us to change our layouts to suit the exact need of different devices without changing the content. • It is applied with the help of CSS3. • Media queries are CSS extensions to media types that give us more control over rendering across different devices. • Media query is a logical expression which is either true or false. • CSS associated with media query is only applied if the expression is true.
  • 3. What are Media Types? • CSS can be used to specify how a document is presented in different media • There are ten media types defined in CSS – all : suitable for all devices. – handheld : for handheld devices. – screen : for color computer screens. – tv : for television type devices. – aural : for speech synthesizer. – braille : for braille tactile feed back devices. – embossed : for paged braille printers. – projection : for projected presentations . – tty : for teletypes and terminals. – print : for print material.
  • 4. Methods to specify Media for CSS • First method: – You can use a <link> element in the head of your HTML document to specify the target media of an external style sheet. Example: <link rel=“stylesheet” href=“a.css” type=“type/css” media=“screen”/> • Second method: – You can use a <?xml-stylesheetl?> element in the head of your XML document to specify the target media of an external style sheet. Example: <?xml-stylesheet media=“screen” rel=“stylesheet” href=“example.css”?>
  • 5. Methods to specify Media for CSS • Third method: – You can specify the target medium within a CSS file using @media Example: @media screen { body{color:blue;} }
  • 6. Media Query Syntax <style> @media screen and (color) { body{color:blue;} } </style> Media type keyword Media feature
  • 8. Types Of Keywords • and: – You can use multiple expressions in a media query if you join them with “and “ keyword. E.g.: <style> @media screen and (minwidth:200px) and (max-width:600px) { body{color:blue;} } </style>
  • 9. Types Of Keywords • Comma Separated: – You can use multiple, comma-separated media queries. – This comma act like an “or” keyword. E.g.: <style> @media screen and (minwidth:200px) or (max-width:600px) { body{color:blue;} } </style>
  • 10. Types Of Keywords • not: – You can use the not keyword in a media query if you want your CSS to be ignored by a specific device. E.g.: <style> @media not screen and (minwidth:200px) { body{color:blue;} } </style>
  • 11. Types Of Keywords • only: – You can use the only keyword in a media query if you want your CSS to be applied only to a specific device. E.g.: <style> @media only screen and (minwidth:200px) { body{color:blue;} } </style>
  • 12. Targeting iPhone • iPhone does not support hand held media type. • Apple recommends targeting the iPhone using media queries. E.g.: <style type=“text/css”> @media screen and (max-width:480px) { body{color:magenta;} } </style>
  • 13. Browser Support for Media Queries