全屏
 <div class="container">
      <img src="04eadd2b-7dd4-43fc-af3d-cff948811986_balloons.jpg.webp" alt="Balloons">
    </div>
    
    <div class="container">
      <img class="one" src="04eadd2b-7dd4-43fc-af3d-cff948811986_balloons.jpg.webp" alt="Balloons">
    </div>
    
    <div class="container">
      <img class="two" src="04eadd2b-7dd4-43fc-af3d-cff948811986_balloons.jpg.webp" alt="Balloons">
    </div>
/* Copyright 2018 Google LLC.
SPDX-License-Identifier: Apache-2.0 */

/* CSS files add styling rules to your content */

body {
  font-family: "Benton Sans", "Helvetica Neue", helvetica, arial, sans-serif;
  margin: 2em;
}

img {
  max-width: 100%;
  display: block;
}

.container {
  width: 400px;
  height: 300px;
  margin: 1em auto;
}

.container img {
  height: 100%;
  width: 100%;
  object-fit: cover;
  -webkit-mask-size: cover;
  mask-size: cover;
}

.one {
  -webkit-mask-image: url04eadd2b-7dd4-43fc-af3d-cff948811986_star-mask.png);
  mask-image: url(04eadd2b-7dd4-43fc-af3d-cff948811986_star-mask.png);  
}

.two {
  -webkit-mask-image: url('04eadd2b-7dd4-43fc-af3d-cff948811986_star-mask-gradient.png');
  mask-image: url('04eadd2b-7dd4-43fc-af3d-cff948811986_star-mask-gradient.png');

}

返回