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.