1. <div class="row">  
  2.             <div>  
  3.                 <label class="form-inline">参加单位:<input type="text" class="form-control" /></label>  
  4.             </div>
  5. </div>  

主要就是添加form-inline就可以了

如果是一个文本框和一个按钮的话那么只需要在外侧用div包含,然后使用form-inline属性就可以

  1. <div class="row">  
  2.            <div class="form-inline">  
  3.                <input type="text" class="form-control" placeholder="关键字" />  
  4.                <button class="btn btn-primary">搜 索</button>  
  5.            </div>  
  6. </div>  

 

在HTML中,让两个DIV在同一行显示,就是通过float属性来设置的,我们可以通过设置3个div,然后第一个div包裹住其他2个div,然后在设置宽高就可以了,我提交一段代码:
<html>
<head>
<title>DIV的同行测试</title>
</head>

<body>
<div>
<div style='flaot:left; width:330px; height:200px;'>
<p>我是左边的固定测试文字</p>
</div>
<div style='flaot:left; width:330px; height:200px;'>
<p>我是右边的固定测试文字</p>
</div>
</div>
</body>

</html>

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-01-09
  • 2021-12-24
  • 2022-12-23
  • 2021-08-08
  • 2022-12-23
  • 2021-11-20
猜你喜欢
  • 2021-07-15
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-05-08
  • 2022-12-23
相关资源
相似解决方案