示例工程 55-design-system

55-design-system/demo-01-buttons/index.html

html · 1.0 KB

运行:按钮系统

点击「运行示例」后,左侧显示源码、右侧显示运行结果;console 输出会实时回传。

<!doctype html>
<html lang="zh-CN">
  <head>
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1" />
    <title>按钮系统</title>
    <link rel="stylesheet" href="style.css" />
  </head>
  <body>
    <h1>按钮系统</h1>
    <p>变体只改变量,状态只改外观。</p>

    <div class="row">
      <button class="btn" type="button">Primary</button>
      <button class="btn btn--ghost" type="button">Ghost</button>
      <button class="btn btn--danger" type="button">Danger</button>
      <button class="btn" type="button" disabled>Disabled</button>
    </div>

    <div class="row">
      <button class="btn btn--sm" type="button">Small</button>
      <button class="btn btn--ghost btn--sm" type="button">Small Ghost</button>
      <button class="btn btn--loading" type="button" aria-busy="true">
        <span class="spinner" aria-hidden="true"></span>
        Loading
      </button>
    </div>
  </body>
</html>