krit@webkit.org | de10ea7 | 2012-10-07 01:35:26 +0000 | [diff] [blame] | 1 | <!DOCTYPE html> |
2 | <html lang="en"> | ||||
3 | <head> | ||||
4 | <style> | ||||
5 | #d { | ||||
6 | width: 180px; | ||||
7 | height: 180px; | ||||
8 | border: 1px solid black; | ||||
9 | } | ||||
10 | #clip { | ||||
11 | width: 160px; | ||||
12 | height: 160px; | ||||
13 | margin: 10px; | ||||
14 | background-color: green; | ||||
15 | -webkit-clip-path: url(#c1); | ||||
16 | } | ||||
17 | </style> | ||||
18 | </head> | ||||
19 | <body> | ||||
20 | <svg height="0"> | ||||
21 | <clipPath id="c1" clipPathUnits="objectBoundingBox"> | ||||
22 | <rect x="0.4" y="0.4" width="0.2" height="0.2"/> | ||||
23 | </clipPath> | ||||
24 | </svg> | ||||
25 | <div id="d"><div id="clip"></div></div> | ||||
26 | </body> | ||||
27 | </html> |