跳到内容
栏目
Fiesta

tblock

界面基元 组件无法成为的那些形状,因为它们包住的主体只有调用方知道:卡片、数据网格、菜单,以及外壳自身的框架。

一张带边框的卡片,只有在它的开关打开时才通过 :has() 显示内容。开关是权威;显示只是便利。

每个示例都能真实操作,但其中的链接不会跳转到任何地方。 HTML 显示可复制的标记。

预览
<div rst-tblock>
  <label rst-tblock-head>
    <input type="checkbox" name="notify" checked>
    <span rst-switch-track aria-hidden="true"></span>
    <span>
      <span rst-tblock-title>邮件通知</span>
      <span rst-tblock-desc>你参与的讨论每有一条回复就会发送。</span>
    </span>
  </label>
  <div rst-tblock-body>
    <div rst-field>
      <label rst-field-label for="notify-freq">频率</label>
      <input rst-input type="text" id="notify-freq" name="notify_freq" value="每日摘要">
    </div>
  </div>
</div>