OLD | NEW |
| (Empty) |
1 <!DOCTYPE html> | |
2 <title>CSS Test: stacked floats with shape-outside</title> | |
3 <link rel="author" title="Adobe" href="http://html.adobe.com/"> | |
4 <link rel="author" title="Bem Jones-Bey" href="mailto:bjonesbe@adobe.com"> | |
5 <link rel="help" href="http://dev.w3.org/csswg/css-shapes-1/#relation-to-box-mod
el-and-float-behavior"> | |
6 <link rel="match" href="shape-outside-floats-stacked-000-ref.html"> | |
7 <meta name="flags" content="ahem"> | |
8 <style> | |
9 .container { | |
10 width: 300px; | |
11 height: 100px; | |
12 font: 50px/1 Ahem, sans-serif; | |
13 line-height: 50px; | |
14 background-color: red; | |
15 margin-bottom: 50px; | |
16 overflow: hidden; | |
17 color: green; | |
18 } | |
19 .float-left { | |
20 width: 100px; | |
21 height: 100px; | |
22 float: left; | |
23 background-color: green; | |
24 } | |
25 .triangle-left { | |
26 shape-outside: polygon(0 0, 0 100%, 100% 100%); | |
27 } | |
28 .float-right { | |
29 position: relative; | |
30 width: 100px; | |
31 height: 100px; | |
32 float: right; | |
33 background-color: green; | |
34 } | |
35 .triangle-right { | |
36 shape-outside: polygon(100% 0, 100% 100%, 0% 100%); | |
37 } | |
38 .circle { | |
39 position: relative; | |
40 top: -50%; | |
41 shape-outside: circle(50%, 50%, 50%); | |
42 } | |
43 </style> | |
44 <body> | |
45 <p>You should see two green rectanges. There should be no red.</p> | |
46 <div class="container"> | |
47 <div class="float-left triangle-left"></div> | |
48 <div class="float-right triangle-right"></div> | |
49 X<br/> | |
50 <div class="float-left circle"></div> | |
51 </div> | |
52 <div style="text-align: right" class="container"> | |
53 <div class="float-right triangle-right"></div> | |
54 <div class="float-left triangle-left"></div> | |
55 X<br/> | |
56 <div class="float-right circle"></div> | |
57 </div> | |
58 </body> | |
OLD | NEW |