media-queries-002.xht (907B)
1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> 2 <html xmlns="http://www.w3.org/1999/xhtml"> 3 <head> 4 <title>The 'width' media feature (for visual devices with desktop viewport widths)</title> 5 <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch"/> 6 <link rel="alternate" href="http://www.hixie.ch/tests/adhoc/css/media/queries/002.html"/> 7 <link rel="help" href="https://www.w3.org/TR/css3-mediaqueries/#width"/> 8 <style type="text/css"><![CDATA[ 9 @media screen and (width) { .a { color: green; } } 10 @media screen and (min-width: 1em) { .b { color: green; } } 11 @media screen and (max-width: 1000000em) { .c { color: green; } } 12 ]]></style> 13 </head> 14 <body> 15 <p class="a"> This line should be green. </p> 16 <p class="b"> This line should be green. </p> 17 <p class="c"> This line should be green. </p> 18 </body> 19 </html>