clip-path-ref.html (468B)
1 <!DOCTYPE html> 2 <html> 3 <head> 4 <meta charset="utf-8"> 5 <title>Clip property (reference)</title> 6 </head> 7 <body> 8 <p>Rectangles should be clipped to a polygon.</p> 9 <div style="background: green; width: 200px; height: 200px; clip-path: polygon(10% 10%, 90% 10%, 90% 90%, 10% 90%)"></div> 10 <div style="background: green; width: 200px; height: 200px; position: absolute; top: 300px; clip-path: polygon(10% 10%, 90% 10%, 90% 90%, 10% 90%)"></div> 11 </div> 12 </body> 13 </html>