OLD | NEW |
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
2 <html> | 2 <html> |
3 <head> | 3 <head> |
4 <script> | 4 <script> |
5 if (window.internals) | |
6 window.internals.settings.setCSSExclusionsEnabled(true); | |
7 window.onload = function() { | 5 window.onload = function() { |
8 var node = document.createTextNode("This text should be contained by the
blue square."); | 6 var node = document.createTextNode("This text should be contained by the
blue square."); |
9 document.getElementById("shape-inside").appendChild(node); | 7 document.getElementById("shape-inside").appendChild(node); |
10 }; | 8 }; |
11 </script> | 9 </script> |
12 <style> | 10 <style> |
13 #shape-inside { | 11 #shape-inside { |
14 width: 200px; | 12 width: 200px; |
15 height: 200px; | 13 height: 200px; |
16 -webkit-shape-inside: rectangle(10px, 10px, 180px, 180px); | 14 -webkit-shape-inside: rectangle(10px, 10px, 180px, 180px); |
17 position: relative; | 15 position: relative; |
18 } | 16 } |
19 #border { | 17 #border { |
20 position: absolute; | 18 position: absolute; |
21 top: 8px; | 19 top: 8px; |
22 left: 8px; | 20 left: 8px; |
23 width: 180px; | 21 width: 180px; |
24 height: 180px; | 22 height: 180px; |
25 border: 2px solid blue; | 23 border: 2px solid blue; |
26 } | 24 } |
27 </style> | 25 </style> |
28 </head> | 26 </head> |
29 <body> | 27 <body> |
30 <div id="shape-inside"> | 28 <div id="shape-inside"> |
31 <div id="border"></div> | 29 <div id="border"></div> |
32 </div> | 30 </div> |
33 Test that text set through javascript should layout within the shape inside. | 31 Test that text set through javascript should layout within the shape inside. |
34 </body> | 32 </body> |
35 </html> | 33 </html> |
OLD | NEW |