OLD | NEW |
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
2 <html> | 2 <html> |
3 <head> | 3 <head> |
4 <style> | 4 <style> |
5 .shape-inside { | 5 .box { |
6 position: absolute; | 6 width: 450px; |
7 left: 0px; | 7 height: 100px; |
8 width: 600px; | 8 line-height: 20px; |
9 height: 200px; | 9 outline: 2px solid green; |
10 } | 10 } |
11 | 11 |
12 .shape-background { | 12 .rounded-rectangle { |
13 position: absolute; | 13 width: 100px; |
14 left: 50px; | |
15 width: 400px; | |
16 height: 100px; | 14 height: 100px; |
17 background-color: green; | |
18 } | 15 } |
19 | 16 |
20 #shape-background-no-overlap { | 17 .details { |
21 top: 50px; | 18 padding-top: 15px; |
| 19 font-style: italic; |
22 } | 20 } |
23 | 21 |
24 #shape-inside-no-overlap { | |
25 top: 0px; | |
26 padding-top: 150px; | |
27 } | |
28 | |
29 #shape-background-overlap { | |
30 top: 250px; | |
31 } | |
32 | |
33 #shape-inside-overlap { | |
34 top: 200px; | |
35 padding-left: 50px; | |
36 padding-top: 149.9px; | |
37 } | |
38 </style> | 22 </style> |
39 </head> | 23 </head> |
40 | 24 |
41 <body> | 25 <body> |
42 <div id="shape-background-no-overlap" class="shape-background"></div> | 26 <div class="box"> |
43 <div id="shape-inside-no-overlap" class="shape-inside">This text should appear
below and to the left of the green rectangle.</div> | 27 <p style="padding-top: 55px; padding-left: 25px;">Content1</p> |
| 28 </div> |
| 29 <p class="details">There is a 400x50px shape-inside rectangle inside the green b
ox.<br/>The Content1 text line's bottom equals to the shape-inside's rectangle b
ottom boundary, so it should fit in the shape-inside.</p> |
| 30 <hr> |
44 | 31 |
45 <div id="shape-background-overlap" class="shape-background"></div> | 32 <div class="box"> |
46 <div id="shape-inside-overlap" class="shape-inside">This text should directly
appear below the green rectangle.</div> | 33 <p style="padding-top: 100px;">Content2</p> |
| 34 </div> |
| 35 |
| 36 <p class="details">There is a 400x50px shape-inside rectangle inside the green b
ox.<br/>The Content2 text line overlaps with the shape-inside's rectangle bottom
boundary, so the Content2 should be pushed below the content box.</p> |
| 37 <hr> |
| 38 |
| 39 <div class="box"> |
| 40 <p style="padding-top: 100px;">Content3</p> |
| 41 </div> |
| 42 |
| 43 <p class="details">There is a 400x50px shape-inside rectangle inside the green b
ox.<br/>The Content3 text line starts after the shape-inside's rectangle bottom
boundary, so the Content3 should be pushed below the content box.</p> |
| 44 <hr> |
| 45 |
| 46 <div class="box rounded-rectangle"> |
| 47 <p style="padding-top: 100px;">Content4</p> |
| 48 </div> |
| 49 <p class="details">There is a 100x100px shape-inside rounded rectangle inside th
e green box.<br/>The shape top and bottom boundaries match with the content box
boundaries, the overflow should start on the left, below the green content box.<
/p> |
| 50 <hr> |
| 51 |
| 52 <div class="box rounded-rectangle"> |
| 53 <p style="padding-top: 100px;">Content5</p> |
| 54 </div> |
| 55 <p class="details">There is a 75x75px shape-inside rounded rectangle inside the
green 100x100px box.<br/>The forth line should overflow, the overflow should sta
rt on the left, below the green content box.</p> |
| 56 <hr> |
| 57 |
| 58 <p>Based on a recent change on the <a href="http://dev.w3.org/csswg/css-exclusio
ns/#shape-inside-property">exclusions specification</a>. The 'shape-inside' prop
erty adds an exclusion area to the element's wrapping context. |
| 59 This modifies the normal rectangular shape of the content area to a possibly non
-rectangular wrapping area. The exclusion area added is defined by subtracting t
he shape from the element's content area.</p> |
| 60 <p>Bug <a href="http://webkit.org/b/114526 ">114526</a>: [CSS Exclusions] shape-
inside overflow should be pushed to the outside of the content box</p> |
47 </body> | 61 </body> |
48 </html> | 62 </html> |
OLD | NEW |