HTML
CSS
JavaScript
play_arrow
HTML
<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width">
  <title>选择控件 - 复选框</title>
  <link rel="stylesheet" href="../assets/mdui-v0.4.3/css/mdui.min.css"/>
</head>
<body>

<div class="mdui-container">
  <div class="mdui-row-md-4">
    <div class="mdui-col">
      <label class="mdui-checkbox">
        <input type="checkbox"/>
        <i class="mdui-checkbox-icon"></i>
        默认不选中
      </label>
    </div>
    <div class="mdui-col">
      <label class="mdui-checkbox">
        <input type="checkbox" checked/>
        <i class="mdui-checkbox-icon"></i>
        默认选中
      </label>
    </div>
    <div class="mdui-col">
      <label class="mdui-checkbox">
        <input type="checkbox" disabled/>
        <i class="mdui-checkbox-icon"></i>
        禁用,且不选中
      </label>
    </div>
    <div class="mdui-col">
      <label class="mdui-checkbox">
        <input type="checkbox" disabled checked/>
        <i class="mdui-checkbox-icon"></i>
        禁用,且选中
      </label>
    </div>
  </div>
  <div class="mdui-row-md-4">
    <div class="mdui-col">
      <label class="mdui-checkbox">
        <input type="checkbox" id="indeterminate-demo1"/>
        <i class="mdui-checkbox-icon"></i>
        不确定状态
      </label>
    </div>
    <script>
      document.getElementById('indeterminate-demo1').indeterminate = true;
    </script>
    <div class="mdui-col">
      <label class="mdui-checkbox">
        <input type="checkbox" disabled id="indeterminate-demo2"/>
        <i class="mdui-checkbox-icon"></i>
        禁用,且不确定状态
      </label>
    </div>
    <script>
      document.getElementById('indeterminate-demo2').indeterminate = true;
    </script>
  </div>
</div>

<script src="../assets/mdui-v0.4.3/js/mdui.min.js"></script>
</body>
</html>
CSS

    
JavaScript