运行 ❯
获取您
自己的
网站
×
更改方向
保存代码
更改主题,深色/浅色
前往 Spaces
<!DOCTYPE html> <html> <head> <style> .masked { width: 200px; height: 200px; mask-repeat: no-repeat; mask-size: 100%; background: blue; -webkit-mask-image: url(img_rectangle.svg), radial-gradient(transparent 50%, black); mask-image: url(img_rectangle.svg), radial-gradient(transparent 50%, black); } .mask1 { mask-composite: add; } .mask2 { mask-composite: subtract; } .mask3 { mask-composite: intersect; } .mask4 { mask-composite: exclude; } </style> </head> <body> <h1>The mask-composite Property</h1> <h3>mask-composite: add;</h3> <div class="masked mask1"></div> <h3>mask-composite: subtract;</h3> <div class="masked mask2"></div> <h3>mask-composite: intersect;</h3> <div class="masked mask3"></div> <h3>mask-composite: exclude:</h3> <div class="masked mask4"></div> </body> </html>