Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/three.js/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Forms 如何使用Twitter'对齐内嵌收音机/复选框并帮助阻止水平形式的元素;s引导3_Forms_Twitter Bootstrap_Twitter Bootstrap 3 - Fatal编程技术网

Forms 如何使用Twitter'对齐内嵌收音机/复选框并帮助阻止水平形式的元素;s引导3

Forms 如何使用Twitter'对齐内嵌收音机/复选框并帮助阻止水平形式的元素;s引导3,forms,twitter-bootstrap,twitter-bootstrap-3,Forms,Twitter Bootstrap,Twitter Bootstrap 3,几天前,我刚开始在一个私人项目中使用它 我有一个水平形式,其中包括一些内联单选复选框组,但这些元素的水平对齐不相等: 问题1:为什么chrome不在标签的同一行上显示帮助块元素 问题2:如何将同一行上的内联无线组与标签对齐 问题3:以下标记有效吗?这些问题与标记有关吗 标记: <div class="container"> <form class="form-horizontal"> <div class="form-group"> <

几天前,我刚开始在一个私人项目中使用它

我有一个水平形式,其中包括一些内联单选复选框组,但这些元素的水平对齐不相等:

问题1:为什么chrome不在标签的同一行上显示帮助块元素

问题2:如何将同一行上的内联无线组与标签对齐

问题3:以下标记有效吗?这些问题与标记有关吗

标记:

<div class="container">
  <form class="form-horizontal">

  <div class="form-group">
    <label class="col-lg-2 control-label">Weight</label>
    <div class="col-lg-1">
      <input type="text" name="weight" class="form-control" value="20">
    </div>
    <div class="help-block"> grams</div>  
  </div>

  <div class="form-group">
    <label class="col-lg-2 control-label">Full part name</label>
    <div class="col-lg-6">
      <input type="text" name="name" class="form-control" placeholder="Don't use numeric characters..">
    </div>
  </div>

  <div class="form-group">
    <label class="col-lg-2 control-label">Inline radios</label>
    <div class="col-lg-10">
      <label class="radio-inline">
        <input type="radio" name="radio"> Hello
      </label>
      <label class="radio-inline">
        <input type="radio" name="radio"> Other
      </label>
      <label class="radio-inline">
        <input type="radio" name="radio"> Another
      </label>
      <label class="radio-inline">
        <input type="radio" name="radio" checked="checked"> Foobar
      </label>
    </div>
  </div>
</form>
</div>

重量
克
完整零件名称
内联无线电
你好
其他
另一个
福巴
编辑:

此外,小屏幕上的此标记会生成“删除的帮助块元素”。我认为我的标记有问题,但我不知道是什么错了


您的标记乍一看似乎是有效的。关于你的第一个问题

您已将输入设置为:

<div class="col-lg-1">
  <input type="text" name="weight" class="form-control" value="20">
</div>
.radio内联没有填充,因此将下面的代码添加到css中:

.radio-inline, .checkbox-inline {
    padding-top: 9px;
 }
见:

.radio-inline, .checkbox-inline {
    padding-top: 9px;
 }