Media type are allow to specify how document will be presented in different media.
The @media rule:
The @media rule allow different style rule use for different media in the same style sheet.
Example below tell the browes to display a 14 pixels verdana font on the screen but if the page is printed,it become 10 pixels times font.
<>
<>
<>
@media screen
{
p.test {font-family:verdana,sans-serif;font-size:14px;}
}
@media print
{
p.test {font-family:times,serif;font-size:10px;}
}
@media screen,print
{
p.test {font-weight:bold;}
}
< /style>
< /head>
<>
....
< /body>
< /html>
<>
<>
@media screen
{
p.test {font-family:verdana,sans-serif;font-size:14px;}
}
@media print
{
p.test {font-family:times,serif;font-size:10px;}
}
@media screen,print
{
p.test {font-weight:bold;}
}
< /style>
< /head>
<>
....
< /body>
< /html>
Reference:
No comments:
Post a Comment