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