| OLD | NEW |
| 1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
| 2 <html> | 2 <html> |
| 3 <head> | 3 <head> |
| 4 <style> | 4 <style> |
| 5 #shape-inside { | 5 #shape-inside { |
| 6 shape-inside: rectangle(10%, 100%, 80%, 200px); | 6 shape-inside: polygon(10% 100%, 90% 100%, 90% 200px, 10% 200px); |
| 7 position: relative; | 7 position: relative; |
| 8 max-height: 200px; | 8 max-height: 200px; |
| 9 } | 9 } |
| 10 #border { | 10 #border { |
| 11 position: absolute; | 11 position: absolute; |
| 12 left: 10%; | 12 left: 10%; |
| 13 width: 80%; | 13 width: 80%; |
| 14 height: 100%; | 14 height: 100%; |
| 15 border: 2px solid blue; | 15 border: 2px solid blue; |
| 16 } | 16 } |
| 17 </style> | 17 </style> |
| 18 </head> | 18 </head> |
| 19 <body> | 19 <body> |
| 20 <div id="shape-inside"> | 20 <div id="shape-inside"> |
| 21 <div id="border"></div> | 21 <div id="border"></div> |
| 22 This text should be contained by a blue rectangle. The rectangle should
be | 22 This text should be contained by a blue rectangle. The rectangle should
be |
| 23 just tall enough to contain the text. There should not be room for any | 23 just tall enough to contain the text. There should not be room for any |
| 24 additional lines above this text. | 24 additional lines above this text. |
| 25 </div> | 25 </div> |
| 26 </body> | 26 </body> |
| 27 </html> | 27 </html> |
| OLD | NEW |