HTML and CSS Reference
In-Depth Information
<!-- stylesheets for print only -->
<link rel=”stylesheet” type=”text/css” media=”print”
src=”print.css>
<style type=”text/css” media=”print” >[...]</style>
<!-- stylesheets for mobiles and projectors -->
<link rel=”stylesheet” tyle=”text/css”
media=”handheld, projection” src=”compact.css”>
<style type=”text/css” media=”handheld, projection” >[...]
</style>
[...]
@import Rule
Like the designation of media types for link elements, external CSS files
included via the @import rule can be restricted to specific media types.
<style type=”text/css”>
/* stylesheets for all media */
@import url(“global1.css”);
@import url(“global2.css”) all ;
/* stylesheets for print only */
@import url(“print.css”) print ;
/* stylesheets for mobiles and projectors */
@import url(“compact.css”) handheld, projection ;
</style>
@media Rule
The @media rule is used to specify that a subset of rules in a block of CSS
code should apply only to the supplied media types. As with the media
attribute of the <style> element, any code where @media rules are found
 
Search WWH ::




Custom Search