element-paint-paintserversize-rounding-01.html (1189B)
1 <!-- 2 Any copyright is dedicated to the Public Domain. 3 http://creativecommons.org/licenses/publicdomain/ 4 5 The green square should always be rendered at 100px. 6 --> 7 <!DOCTYPE html> 8 <html> 9 <head> 10 <style> 11 body > div { 12 width: 200px; 13 height: 200px; 14 float: left; 15 background-repeat: no-repeat; 16 } 17 18 div > div { 19 background: lime; 20 } 21 22 </style> 23 </head> 24 <body style="margin:0"> 25 <div style="background-image: -moz-element(#eInteger)"></div> 26 <div style="background-image: -moz-element(#eRoundUp1)"></div> 27 <div style="background-image: -moz-element(#eRoundUp2)"></div> 28 <div style="background-image: -moz-element(#eRoundDown1)"></div> 29 <div style="background-image: -moz-element(#eRoundDown2)"></div> 30 31 <div style="overflow:hidden; height:0"> 32 <div id="eInteger" style="margin: 0.3px; width: 100px; height: 100px;"></div> 33 <div id="eRoundUp1" style="margin: 0.3px; width: 99.6px; height: 99.6px;"></div> 34 <div id="eRoundUp2" style="margin: 0.6px; width: 99.6px; height: 99.6px;"></div> 35 <div id="eRoundDown1" style="margin: 0.3px; width: 100.3px; height: 100.3px;"></div> 36 <div id="eRoundDown2" style="margin: 0.6px; width: 100.3px; height: 100.3px;"></div> 37 </div> 38 </body> 39 </html>