Twitter bootstrap 如何将按钮与某些文本放在同一行上?

Twitter bootstrap 如何将按钮与某些文本放在同一行上?,twitter-bootstrap,Twitter Bootstrap,我正在使用Bootstrap3,并试图将一个按钮与一些文本放在同一行,但运气不好。我犯了一个错误。我错过了什么?非常感谢 <div class="container"> <div class="col-xs-12 col-md-6 col-sm-8 col-lg-6 center-block"> <br> <p>Put the button on the same line as this text.</p> <span c

我正在使用Bootstrap3,并试图将一个按钮与一些文本放在同一行,但运气不好。我犯了一个错误。我错过了什么?非常感谢

<div class="container">
 <div class="col-xs-12 col-md-6 col-sm-8 col-lg-6 center-block">
 <br>
<p>Put the button on the same line as this text.</p>

<span class="pull-right">
<button type="button" class="btn btn-default btn-small" name="submit" id="submit">+ Add Me</button></span>
<br>
 </div>
  </div>


将按钮与此文本放在同一行

+加上我

创建一个包含按钮的div,然后向右拉按钮:

<div class="container">
  <span>Put the button on the same line as this text.</span>
  <div class="pull-right">
    <div class="btn btn-small">+ Add Me</div>
  </div>
</div>

将按钮与此文本放在同一行。
+加上我

创建一个包含按钮的div,然后
向右拉它:

<div class="container">
  <span>Put the button on the same line as this text.</span>
  <div class="pull-right">
    <div class="btn btn-small">+ Add Me</div>
  </div>
</div>

将按钮与此文本放在同一行。
+加上我

试试这个

<div class="container">
 <div class="col-xs-12 col-md-6 col-sm-8 col-lg-6 center-block">
 <br>
<p>Put the button on the same line as this text.</p>

<span class="pull-right">
<button style =" margin-top:0px;" type="button" class="btn btn-default btn-small" name="submit" id="submit">+ Add Me</button></span>
<br>
 </div>
  </div>


将按钮与此文本放在同一行

+加上我
试试这个

<div class="container">
 <div class="col-xs-12 col-md-6 col-sm-8 col-lg-6 center-block">
 <br>
<p>Put the button on the same line as this text.</p>

<span class="pull-right">
<button style =" margin-top:0px;" type="button" class="btn btn-default btn-small" name="submit" id="submit">+ Add Me</button></span>
<br>
 </div>
  </div>


将按钮与此文本放在同一行

+加上我

我对您的代码做了一点修改,将按钮放在同一行上。下面是它现在的样子-



将按钮与此文本放在同一行。 +加上我



我对您的代码做了一点修改,将按钮放在同一行上。下面是它现在的样子-



将按钮与此文本放在同一行。 +加上我