OLD | NEW |
| (Empty) |
1 <!DOCTYPE html> | |
2 <html> | |
3 <head> | |
4 <!-- | |
5 In this test the shape-inside shape is a rounded rectangle configured as a circl
e with radius of 100px. | |
6 The shape-inside element contains a single square Ahem font character that just
fits wthin the circle. | |
7 That means that the character's size is sqrt(2)*100px, which is 141.41356px. | |
8 --> | |
9 <style> | |
10 #shape-container { | |
11 position: relative; | |
12 display: inline-block; | |
13 width: 200px; | |
14 height: 200px; | |
15 margin: 10px; | |
16 } | |
17 | |
18 #shape-background { | |
19 position: absolute; | |
20 top: 0px; | |
21 left: 0px; | |
22 width: 200px; | |
23 height: 200px; | |
24 border-radius: 100px / 100px; | |
25 background-color: rgb(200,200,200); | |
26 } | |
27 | |
28 #shape-inside { | |
29 position: absolute; | |
30 top: 0px; | |
31 left: 0px; | |
32 width: 200px; | |
33 height: 200px; | |
34 shape-inside: rectangle(0px, 0px, 200px, 200px, 100px, 100px); | |
35 font: 141.421356px/1 Ahem, sans-serif; | |
36 color: green; | |
37 } | |
38 </style> | |
39 </head> | |
40 <body> | |
41 <p>The green rectangle should appear within the grey circle.</p> | |
42 <div id="shape-container"> | |
43 <div id="shape-background"></div> | |
44 <div id="shape-inside">X</div> | |
45 </div> | |
46 </body> | |
47 </html> | |
OLD | NEW |