<!DOCTYPE html>
<html>
<head>
<style>
.mask1 { -webkit-mask-image: url(/i/logo/w3.png);
mask-image: url(/i/logo/w3.png);
mask-size: 70%;
mask-repeat: no-repeat;
mask-mode: luminance;
}
.mask2 { -webkit-mask-image: url(/i/logo/w3.png);
mask-image: url(/i/logo/w3.png);
mask-size: 70%;
mask-repeat: no-repeat;
mask-mode: alpha;
}
</style>
</head>
<body>
<h1>mask-mode 属性</h1>
<h3>将遮罩层图像视为亮度遮罩:</h3>
<div class="mask1">
<img src="/i/photo/beijing.jpg" alt="北京" width="600" height="400">
</div>
<h3>将遮罩层图像视为透明度遮罩:</h3>
<div class="mask2">
<img src="/i/photo/beijing.jpg" alt="北京" width="600" height="400">
</div>
<h3>原始图像:</h3>
<img src="/i/photo/beijing.jpg" alt="北京" width="600" height="400">
</body>
</html>