OLD | NEW |
| (Empty) |
1 <!DOCTYPE html> | |
2 <html> | |
3 <head> | |
4 <style> | |
5 .shape-container { | |
6 position: relative; | |
7 width: 400px; | |
8 height: 20px; | |
9 margin: 10px; | |
10 } | |
11 | |
12 .shape-background { | |
13 position: absolute; | |
14 top: 0px; | |
15 left: 0px; | |
16 width: 400px; | |
17 height: 200px; | |
18 border-radius: 200px / 50px; | |
19 background-color: rgb(200,200,200); | |
20 } | |
21 | |
22 .shape-inside { | |
23 position: absolute; | |
24 top: 0px; | |
25 left: 0px; | |
26 width: 400px; | |
27 height: 200px; | |
28 shape-inside: rectangle(0px, 0px, 400px, 200px, 200px, 50px); | |
29 font: 50px/1 Ahem, sans-serif; | |
30 color: green; | |
31 } | |
32 </style> | |
33 </head> | |
34 <body> | |
35 <p>The green rectangle should appear just below the grey rounded rectangle's upp
er corners.</p> | |
36 <div class="shape-container"> | |
37 <div class="shape-background"></div> | |
38 <div class="shape-inside">XXXXXXXX</div> | |
39 </div> | |
40 </body> | |
41 </html> | |
OLD | NEW |