OLD | NEW |
| (Empty) |
1 <!-- Based on fast/repaint/box-sizing-padding-keeping-size.html --> | |
2 <!DOCTYPE HTML> | |
3 <script src="resources/paint-invalidation-test.js"></script> | |
4 <script> | |
5 function paintInvalidationTest() | |
6 { | |
7 document.getElementById('target1').className = 'content-box'; | |
8 document.getElementById('target2').className = 'border-box'; | |
9 } | |
10 window.onload = runPaintInvalidationTest; | |
11 </script> | |
12 <style> | |
13 body { | |
14 margin: 0; | |
15 } | |
16 div { | |
17 position: absolute; | |
18 background-color: green; | |
19 } | |
20 .border-box { | |
21 width: 100px; | |
22 height: 100px; | |
23 box-sizing: border-box; | |
24 } | |
25 .content-box { | |
26 width: 60px; | |
27 height: 60px; | |
28 box-sizing: content-box; | |
29 padding: 20px; | |
30 } | |
31 </style> | |
32 <div id="target1" class="border-box" style="top: 0px"></div> | |
33 <div id="target2" class="content-box" style="top: 200px"></div> | |
OLD | NEW |