mq_print_maxheight.xhtml 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. <?xml version="1.0" encoding="iso-8859-1" ?>
  2. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
  3. <html xmlns="http://www.w3.org/1999/xhtml" class="reftest-print">
  4. <head>
  5. <title>Media Query - Print mode test - max-height</title>
  6. <style type="text/css"><![CDATA[
  7. p {height: 10px; width: 100px; color: yellow; }
  8. @media print { .a { color: aqua; } }
  9. @media screen { .b { color: aqua; } }
  10. /* we set the height to 3 inches/216pt/76mm in the reftest-print class*/
  11. @media (max-height: 3in) { .c { color: aqua; } } /* y */
  12. @media (max-height: 216pt) { .d { color: aqua; } } /* y */
  13. @media (max-height: 76.2mm) { .e { color: aqua; } } /* y */
  14. @media print and (max-height: 3in) { .f {color: aqua; } } /* y */
  15. @media print and (max-height: 216pt) { .g {color: aqua; } }/* y */
  16. @media print and (max-height: 76.2mm) { .h {color: aqua; } }/* y */
  17. @media all and (max-height: 3in) { .i { color: aqua; } } /* y */
  18. /* negative cases - values < set values */
  19. @media all and (max-height: 2in) { .j { color: aqua; } } /* n */
  20. @media (max-height: 50mm) { .k { color: aqua; } } /* n */
  21. @media (max-height: 1.57in) { .l { color: aqua; } } /* n */
  22. @media (max-height: 157pt) { .m { color: aqua; } } /* n */
  23. @media screen and (max-height: 3in) { .n {color: aqua; } } /* n */
  24. @media screen and (max-height: 216pt) { .o {color: aqua; } } /* n */
  25. @media screen and (max-height: 76.2mm) { .p {color: aqua; } } /* n */
  26. ]]></style>
  27. </head>
  28. <body>
  29. <p class="a">a</p>
  30. <p class="b">b</p>
  31. <p class="c">c</p>
  32. <p class="d">d</p>
  33. <p class="e">e</p>
  34. <p class="f">f</p>
  35. <p class="g">g</p>
  36. <p class="h">h</p>
  37. <p class="i">i</p>
  38. <p class="j">j</p>
  39. <p class="k">k</p>
  40. <p class="l">l</p>
  41. <p class="m">m</p>
  42. <p class="n">n</p>
  43. <p class="o">o</p>
  44. <p class="p">p</p>
  45. </body>
  46. </html>