输入组中带有input-group-addon

时间:2018-12-03 18:42:21

标签: twitter-bootstrap twitter-bootstrap-3

创建包含input-groupinput-group-addon元素的<input type="radio">时,单选元素的样式看起来非常奇怪。有没有更好的方式来进行这种样式设置?

<form>
  <div class="input-group"><span class="input-group-addon">
    <input name="catalog.tecdoc_webservice_enabled_is_nonblank" type="checkbox" value="true" checked=""></span>
    <label class="radio-inline"><input name="tecdoc_webservice_enabled" type="radio" value="true" checked="">enabled</label>
    <label class="radio-inline"><input name="tecdoc_webservice_enabled" type="radio" value="false">disabled</label>
  </div>
 </form>

rendered bootstrap

https://www.bootply.com/EtjEb4QOGV

1 个答案:

答案 0 :(得分:0)

在无线电输入周围添加<div class="form-control">看起来很不错:

https://www.bootply.com/lbtAbZ1bIR#

<div class="container">
<form>
  <div class="input-group"><span class="input-group-addon">

    <input name="catalog.tecdoc_webservice_enabled_is_nonblank" type="checkbox" value="true" checked=""></span>
    <div class="form-control">
        <label class="radio-inline"><input name="catalog.tecdoc_webservice_enabled" type="radio" value="true" checked="">enabled</label>
        <label class="radio-inline"><input name="catalog.tecdoc_webservice_enabled" type="radio" value="false">disabled</label>
    </div>
  </div>
</form>
</div><!-- /.container -->

enter image description here

相关问题