运行 ❯
获取您
自己的
网站
×
更改方向
保存代码
更改主题,深色/浅色
前往Spaces
<!DOCTYPE html> <html> <head> <style> .mask1 { mask: linear-gradient(black, transparent); } .mask2 { mask: radial-gradient(circle, black 50%, rgba(0, 0, 0, 0.5) 50%); } .mask3 { mask: radial-gradient(ellipse, black 50%, rgba(0, 0, 0, 0.5) 50%); } </style> </head> <body> <h1>The mask Property</h1> <h3>An image with a mask layer (from top to bottom):</h3> <div class="mask1"> <img src="img_5terre.jpg" alt="Cinque Terre" width="600" height="400"> </div> <h3>An image with a mask layer (a circle):</h3> <div class="mask2"> <img src="img_5terre.jpg" alt="Cinque Terre" width="600" height="400"> </div> <h3>An image with a mask layer (an ellipse):</h3> <div class="mask3"> <img src="img_5terre.jpg" alt="Cinque Terre" width="600" height="400"> </div> <h3>Original image:</h3> <img src="img_5terre.jpg" alt="Cinque Terre" width="600" height="400"> </body> </html>