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-textfield">
      <i class="mdui-icon material-icons">email</i>
      <input class="mdui-textfield-input" type="email" placeholder="Email"/>
    </div>

    <!-- 固定标签 -->
    <div class="mdui-textfield">
      <i class="mdui-icon material-icons">account_circle</i>
      <label class="mdui-textfield-label">User name</label>
      <input class="mdui-textfield-input" type="text"/>
    </div>

    <!-- 浮动标签、多行文本框 -->
    <div class="mdui-textfield mdui-textfield-floating-label">
      <i class="mdui-icon material-icons">textsms</i>
      <label class="mdui-textfield-label">Message</label>
      <textarea class="mdui-textfield-input"></textarea>
    </div>

    <!-- 禁用状态 -->
    <div class="mdui-textfield">
      <i class="mdui-icon material-icons">lock</i>
      <input class="mdui-textfield-input" type="text" placeholder="Disabled" disabled/>
    </div>
  </div>

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

  
JavaScript