全屏
  <figure class="container">
      <img src="04eadd2b-7dd4-43fc-af3d-cff948811986_balloons.jpg.webp" alt="balloons">

    </figure>
/* 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 {
  max-width: 400px;
  hight: 300px;
  margin: 1em auto;
  border:1px solid #ccc;
  
}

.container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  -webkit-mask-image:
  linear-gradient(45deg, #000000 25%, rgba(0,0,0,0.2) 25%),
  linear-gradient(-45deg, #000000 25%, rgba(0,0,0,0.2) 25%),
  linear-gradient(45deg, rgba(0,0,0,0.2) 75%, #000000 75%),
  linear-gradient(-45deg, rgba(0,0,0,0.2) 75%, #000000 75%);
-webkit-mask-size:20px 20px;
  -webkit-mask-position: 0 0, 0 10px, 10px -10px, -10px 0px;
}

返回