absolute_length_units.html (1910B)
1 <!DOCTYPE html> 2 <html> 3 <!-- Submitted from TestTWF Paris --> 4 <head> 5 6 <meta charset="UTF-8"> 7 8 <title>CSS Values and Units Test: elements should be the real world size given in mm, cm, inches...</title> 9 <link rel="author" title="Marc Bourlon" href="mailto:marc@bourlon.com"> 10 <link rel="help" href="https://www.w3.org/TR/css3-values/#absolute-lengths" title="5.2 Absolute lengths: the cm, mm, Q, in, pt, pc, px units"> 11 12 <style type="text/css"> 13 14 .s1mm { background-color: fuchsia; width: 1mm; height: 1mm; } 15 .s10mm { background-color: olive; width: 10mm; height: 10mm; } 16 .s1cm { background-color: orange; width: 1cm; height: 1cm; } 17 .s254cm { background-color: gray; width: 2.54cm; height: 2.54cm; } 18 .s1in { background-color: blue; width: 1in; height: 1in; } 19 20 .inline { float: left; } 21 22 .newline { clear: left; } 23 24 p { clear: both; margin: 10px 0; } 25 26 </style> 27 28 </head> 29 <body> 30 31 <p> 32 There should be a 1mm (width) by 1mm (height) fuchsia square: 33 </p> 34 35 <div class="s1mm"></div> 36 37 <p> 38 There should be a 10mm (width) by 1mm (height) fuchsia stripe: 39 </p> 40 41 <div class="s1mm newline inline"></div> 42 <div class="s1mm inline"></div> 43 <div class="s1mm inline"></div> 44 <div class="s1mm inline"></div> 45 <div class="s1mm inline"></div> 46 <div class="s1mm inline"></div> 47 <div class="s1mm inline"></div> 48 <div class="s1mm inline"></div> 49 <div class="s1mm inline"></div> 50 <div class="s1mm inline"></div> 51 52 <p> 53 There should be a 10mm (width) by 10mm (height) olive square: 54 </p> 55 56 <div class="s10mm newline "></div> 57 58 <p> 59 There should be a 1cm (width) by 1cm (height) orange square. So, same width above: 60 </p> 61 62 <div class="s1cm newline "></div> 63 64 <p> 65 There should be a 2.54cm (width) by 2.54cm (height) gray square: 66 </p> 67 68 <div class="s254cm newline "></div> 69 70 <p> 71 There should be a 1in (width) by 1in (height) blue square. So, same width as above: 72 </p> 73 74 <div class="s1in"></div> 75 76 </body> 77 </html>