通过在文本输入框 <input> 前面、后面或是两边加上文字或按钮,可以实现对表单控件的扩展。为 .input-group 赋予 .input-group-addon 或 .input-group-btn 类,可以给 .form-control 的前面或后面添加额外的元素。

 

<div class="input-group">
  <span class="input-group-addon">$</span>
  <input type="text" class="form-control" aria-label="Amount (to the nearest dollar)">
  <span class="input-group-addon">.00</span>
</div>

也可以在span中放入一个checkbox

相关文章:

  • 2021-11-08
  • 2022-03-03
  • 2022-12-23
  • 2021-03-31
  • 2021-12-19
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-07-08
  • 2021-12-19
  • 2022-12-23
  • 2022-01-22
  • 2022-02-23
  • 2022-12-23
  • 2021-12-13
相关资源
相似解决方案