【问题标题】:What does .col-form-label class do to the label in bootstrap?.col-form-label 类对引导程序中的标签有什么作用?
【发布时间】:2021-08-07 23:29:22
【问题描述】:

就像这里在第一个标签中提到的类

<form>
  <div class="form-group row">
     <label for="staticEmail" class="col-sm-2 col-form-label">Email</label>
     <div class="col-sm-10">
      <input type="text" readonly class="form-control-plaintext" id="staticEmail" 
       value="email@example.com">
      </div>
  </div>
</form>

【问题讨论】:

    标签: html node.js bootstrap-4 frontend react-fullstack


    【解决方案1】:

    横版
    通过将 .row 类添加到表单组并使用 .col-- 类指定标签和控件的宽度,使用网格创建水平表单。请务必将 .col-form-label 添加到您的 &lt;label&gt;s 中,以便它们与其关联的表单控件垂直居中。

    阅读所有相关信息here。

    【讨论】:

      猜你喜欢
      • 2021-09-05
      • 2017-09-19
      • 2013-08-28
      • 2016-09-02
      • 2019-09-13
      • 2019-01-05
      • 1970-01-01
      • 2022-12-15
      • 1970-01-01
      相关资源
      最近更新 更多