【发布时间】:2016-10-09 17:18:31
【问题描述】:
我是 Angular 的新手,正在尝试开发我的第一个应用程序,但使用引导类卡住了。
这是我的代码:
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" rel="stylesheet" />
<div class="row">
<div class="form-group col-md-4">
<label>Client</label>
<Select class="form-control">
<option>Client 1</option>
<option>Client 2</option>
<option>Client 3</option>
<option>Client 4</option>
<option>Client 5</option>
<option>Client 6</option>
</Select>
</div>
<div class="form-group col-md-4">
<button type=submit class="btn btn-sm btn-success"><i class="fa fa-dot-circle-o"></i> Add</button>
</div>
<div class="form-group col-md-4">
<button type="submit" class="btn btn-sm btn-info pull-right" vertical-align="bottom"><i class="fa fa-dot-circle-o"></i> Get Data</button>
</div>
</div>
这里是这段代码的输出
问题是所有这些输入都是顶部对齐的,但我希望客户端下拉菜单和两个按钮都底部对齐。
我尝试了input-group-btn 课程,但这对我不起作用。即使在 StackOverflow 上,我也只找到了关于右对齐的解决方案。
【问题讨论】:
-
“顶部对齐”是什么意思?你到底希望它是怎样的?
-
@Roysh 我希望添加按钮与客户端下拉列表对齐,而不是像现在这样与客户端标签对齐
-
知道了。那么最简单和最丑陋的解决方案是为按钮添加一些填充/边距并将它们与输入对齐。否则,请尝试将标签标签从行中取出。顺便说一句,您可以尝试上传小提琴吗?
-
我尝试了边距/填充,它对我有用,但这不是一个好的解决方案。没有像pull-right这样的东西吗?
标签: html css twitter-bootstrap angular-ui-bootstrap