OLD | NEW |
| (Empty) |
1 <!DOCTYPE html> | |
2 <html> | |
3 <head> | |
4 <script src="../resources/subpixel-utils.js"></script> | |
5 <style> | |
6 #shape-inside { | |
7 position: relative; | |
8 } | |
9 | |
10 #shape-outline { | |
11 position: absolute; | |
12 top: 0px; | |
13 left: 0px; | |
14 width: 400px; | |
15 height: 400px; | |
16 } | |
17 | |
18 #shape-content { | |
19 position: absolute; | |
20 top: 129.289px; | |
21 left: 129.289px; | |
22 font: 141.42px/1 Ahem, sans-serif; | |
23 color: green; | |
24 } | |
25 </style> | |
26 </head> | |
27 <body> | |
28 <div id="shape-inside"> | |
29 <div id="shape-content">X</div> | |
30 <svg id="shape-outline" xmlns="http://www.w3.org/2000/svg"> | |
31 <circle cx="200" cy="200" r="100" stroke="blue" fill="none"/> | |
32 </svg> | |
33 </div> | |
34 </body> | |
35 <script> | |
36 // The ExclusionShape::firstIncludedIntervalLogicalTop() methods use ceiledLayou
tUnit() to ensure that their | |
37 // return value is within the shape. If subpixel layout is disabled, that's the
same as just ceil(), which | |
38 // move the top of the "shape-content" div to ceil(129.289) = 130. | |
39 if (!SubPixelLayout.isEnabled()) | |
40 document.getElementById("shape-content").style.top = "130px"; | |
41 </script> | |
42 </html> | |
OLD | NEW |