OLD | NEW |
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
2 <html> | 2 <html> |
3 <head> | 3 <head> |
4 <script> | 4 <script> |
5 if (window.internals) | 5 if (window.internals) |
6 window.internals.settings.setCSSExclusionsEnabled(true); | 6 window.internals.settings.setCSSShapesEnabled(true); |
7 </script> | 7 </script> |
8 <style> | 8 <style> |
9 #container { | 9 #container { |
10 border: 2px solid blue; | 10 font: 20px Ahem, sans-serif; |
| 11 -webkit-font-smoothing: none; |
| 12 line-height: 20px; |
11 position: relative; | 13 position: relative; |
12 width: 200px; | 14 width: 200px; |
13 height: 200px; | 15 height: 200px; |
| 16 border: 2px solid blue; |
14 } | 17 } |
15 #shape-inside { | 18 #shape-inside { -webkit-shape-inside: rectangle(50px, 0px, 100px, 50px); } |
16 -webkit-shape-inside: rectangle(50px, 0px, 100px, 50px); | |
17 } | |
18 #border { | 19 #border { |
19 position: absolute; | 20 position: absolute; |
20 left: 48px; | 21 left: 49px; |
21 width: 100px; | 22 width: 100px; |
22 height: 50px; | 23 height: 50px; |
23 border: 2px solid green; | 24 margin-top: -2px; |
24 } | 25 border: 1px solid green; |
25 #border-overflow { | |
26 position: absolute; | |
27 top: 50px; | |
28 width: 200px; | |
29 height: 150px; | |
30 border: 2px solid blue; | |
31 } | 26 } |
32 </style> | 27 </style> |
33 </head> | 28 </head> |
34 <body> | 29 <body> |
35 <div id="container"> | 30 <div id="container"> |
| 31 <div id="shape-inside"> |
36 <div id="border"></div> | 32 <div id="border"></div> |
37 <div id="shape-inside"> | 33 X X X X X X X X X X X X |
38 This text should wrap inside the green rectangle, and overflow shoul
d wrap | |
39 inside the blue rectangle. | |
40 </div> | 34 </div> |
41 </div> | 35 </div> |
| 36 <p>Requires Ahem font. The content should wrap inside the green rectangle, a
nd the overflow should wrap inside the blue rectangle.</p> |
42 </body> | 37 </body> |
43 </html> | 38 </html> |
OLD | NEW |