x
 
<!DOCTYPE html>
<html>
<head>
<style>
.mask1 {
  -webkit-mask-image: url(/i/logo/w3.png); /* WebKit 浏览器的遮罩图像 */
  mask-image: url(/i/logo/w3.png); /* 标准遮罩图像 */
  mask-size: 50%; /* 遮罩大小设置为 50% */
  mask-repeat: no-repeat; /* 遮罩不重复 */
}
.mask2 {
  -webkit-mask-image: url(/i/logo/w3.png); /* WebKit 浏览器的遮罩图像 */
  mask-image: url(/i/logo/w3.png); /* 标准遮罩图像 */
  mask-size: 50%; /* 遮罩大小设置为 50% */
  mask-repeat: repeat; /* 遮罩重复 */
}
</style>
</head>
<body>
<h1>mask-repeat 属性</h1>
<h3>设置 mask-repeat: no-repeat:</h3>
<div class="mask1">
  <img src="/i/photo/beijing.jpg" alt="北京" width="600" height="400">
</div>
<h3>设置 mask-repeat: repeat:</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>