Bootstrap 塊級幫助文字


Bootstrap 表單控制元件可以擁有與輸入項流動的塊級幫助文字。要新增一個全寬的內容塊,請在 <input> 後使用 .help-block。

以下示例演示了這一點

示例

實際演示

<!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>
      <form role = "form">
         <span>Example of Help Text</span>
         <input class = "form-control" type = "text" placeholder = "">
         <span class = "help-block">
            A longer block of help text that breaks onto a new line and may extend beyond one line.
         </span>
      </form>
   </body>
</html>

更新於: 2020 年 6 月 12 日

1000+ 次瀏覽

啟動您的職業生涯

完成課程即可獲得認證

開始
Advertisement
© . All rights reserved.