使用 Bootstrap 為輸入新增反饋圖示


若要新增反饋圖示,請使用 Bootstrap 中的 .has-feedback 類。

你可以嘗試執行以下程式碼來設定反饋圖示 −

示例

線上演示

<!DOCTYPE html>
<html>
   <head>
      <title>Bootstrap Example</title>
      <link href = "/bootstrap/css/bootstrap.min.css" rel = "stylesheet">
      <script src = "/scripts/jquery.min.js"></script>
      <script src = "/bootstrap/js/bootstrap.min.js"></script>
   </head>
   <body>
      <div class = "form-group has-feedback">
         <label class = "col-sm-2 control-label" for = "inputSuccess">Example</label>
         <div class="col-sm-10">
            <input type = "text" class="form-control" id = "inputSuccess">
            <span class = "glyphicon glyphicon-ok form-control-feedback"></span>
         </div>
      </div>
   </body>
</html>

更新於: 2020 年 6 月 12 日

714 次瀏覽

啟動你的 職業

透過完成課程進行認證

開始
廣告
© . All rights reserved.