引导3.0:如何在同一行上有文本和输入? [英] Bootstrap 3.0: How to have text and input on same line?

查看:203
本文介绍了引导3.0:如何在同一行上有文本和输入?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在将我的网站切换到Bootstrap 3.0。我遇到了表单输入和文本格式问题。 Bootstrap 2中的工作方式在Bootstrap 3中不起作用。

如何在表单输入之前和之后在同一行上获取文本?我已经将范围缩小到示例的Bootstrap 3版本中的form-control类。



如何获取所有文本和在一行上输入?我想bootstrap 3的例子看起来像在jsfiddle引导2例子。



JS小提琴示例

 < div class =container> 
< form>
< h3>在Bootstrap 2中使用的格式< / h3>
< div class =row>
< label for =return1>< b>返回:< / b>< / label>
< input id =return1name ='return1'class =input input-smstyle =width:150px
type =textvalue ='8/28/2013'>
< span id ='return1'style ='color:blue'> +/- 14天< / span>
< / div>

< br>
< br>
< h3> BootStrap 3版本< / h3>

< div class =row>
< label for =return2>< b>返回:< / b>< / label>
< input id =return2name ='return2'class =form-control input input-smstyle =width:150px
type =textvalue ='8/28 / 2013' >
< span id ='return2'style ='color:blue'> +/- 14天< / span>
< / div>
< / form>





更新:
我将代码更改为这个工作,但现在对齐有问题。任何想法?

 < div class =form-group> 
< div class =row>
< div class =col-xs-3>
< label for =class_type>< h2>< span class =label label-primary> Class Type< / span>< / h2>< / label>
< / div>
< div class =col-xs-2>
发送“验证码”获取 | 15天全站免登陆