全屏
<h1>
  You 
  <span class="dont">你的浏览器版本低,不支持 don't</span>
  have subgrid
</h1>
@supports (grid-template-columns: subgrid) {
  .dont {
    display: none;
  }
}

@layer demo.support {
  .dont {
    text-decoration: 2px red wavy underline;
  }
  
  * {
    box-sizing: border-box;
    margin: 0;
  }

  html {
    block-size: 100%;
    color-scheme: dark light;
  }

  body {
    min-block-size: 100%;
    font-family: system-ui, sans-serif;

    display: grid;
    place-content: center;
  }
}
返回