What Is Media Query?
One of the most important features of style sheets is that they specify how a document is to be presented on different media: on the screen, on paper, with a speech synthesizer, with a braille device, etc.
- here are currently two ways to specify media dependencies for style sheets:
- Specify the target medium from a style sheet with the @media or @import at-rules.
- Specify the target medium within the document language.
For e.g:-
<style tyle="text/css">
<!--
@media print {
body { font-size: 10pt }
}
@media screen {
body { font-size: 12pt }
}
@media screen, print {
body { line-height: 1.2 }
}
-->
</style>
<style tyle="text/css">
<!--
@media print {
body { font-size: 10pt }
}
@media screen {
body { font-size: 12pt }
}
@media screen, print {
body { line-height: 1.2 }
}
-->
</style>
No comments:
Post a Comment