HTML
CSS
JavaScript
HTML
<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width">
  <title>选择控件 - 开关切换</title>
  <link rel="stylesheet" href="https://cdn.w3cbus.com/library/mdui/1.0.2/css/mdui.min.css"/>
</head>
<body>

  <div class="mdui-container">
    <div class="mdui-row-md-4">
      <div class="mdui-col">
        <label class="mdui-switch">
          <input type="checkbox"/>
          <i class="mdui-switch-icon"></i>
        </label>
      </div>
      <div class="mdui-col">
        <label class="mdui-switch">
          <input type="checkbox" checked/>
          <i class="mdui-switch-icon"></i>
        </label>
      </div>
      <div class="mdui-col">
        <label class="mdui-switch">
          <input type="checkbox" disabled/>
          <i class="mdui-switch-icon"></i>
        </label>
      </div>
      <div class="mdui-col">
        <label class="mdui-switch">
          <input type="checkbox" disabled checked/>
          <i class="mdui-switch-icon"></i>
        </label>
      </div>
    </div>
  </div>

  <script src="https://cdn.w3cbus.com/library/mdui/1.0.2/js/mdui.min.js"></script>
</body>
</html>
CSS

  
JavaScript