| 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 width: 200px; | 6 width: 200px; |
| 7 height: 300px; | 7 height: 300px; |
| 8 shape-inside: rectangle(10px, 15px, 170px, 280px); | 8 shape-inside: polygon(10px 15px, 180px 15px, 180px 295px, 10px 295px); |
| 9 position: relative; | 9 position: relative; |
| 10 } | 10 } |
| 11 #border { | 11 #border { |
| 12 position: absolute; | 12 position: absolute; |
| 13 top: 13px; | 13 top: 13px; |
| 14 left: 8px; | 14 left: 8px; |
| 15 width: 170px; | 15 width: 170px; |
| 16 height: 280px; | 16 height: 280px; |
| 17 border: 2px solid blue; | 17 border: 2px solid blue; |
| 18 } | 18 } |
| 19 p { margin-top: 0; } | 19 p { margin-top: 0; } |
| 20 </style> | 20 </style> |
| 21 </head> | 21 </head> |
| 22 <body> | 22 <body> |
| 23 <div id="shape-inside"> | 23 <div id="shape-inside"> |
| 24 <div id="border"></div> | 24 <div id="border"></div> |
| 25 <div> | 25 <div> |
| 26 <p>Paragraph 1. This paragraph should be just below the top edge of
the blue | 26 <p>Paragraph 1. This paragraph should be just below the top edge of
the blue |
| 27 rectangle. It's left and right edges should be within the blue recta
ngle. | 27 rectangle. It's left and right edges should be within the blue recta
ngle. |
| 28 </div> | 28 </div> |
| 29 <p>Paragraph 2. This paragraph should be just below paragraph 1. Its lef
t | 29 <p>Paragraph 2. This paragraph should be just below paragraph 1. Its lef
t |
| 30 and right edges should also be within the blue rectangle. | 30 and right edges should also be within the blue rectangle. |
| 31 </div> | 31 </div> |
| 32 </body> | 32 </body> |
| 33 </html> | 33 </html> |
| OLD | NEW |