【发布时间】:2017-01-16 16:31:03
【问题描述】:
需要下拉菜单、 textbox1 、 textbox2 和一个按钮 o 在同一行中彼此相邻。 通过阅读其他相关问题,我想出了以下内容。
.input-group-glue {
width: 0;
display: table-cell;
}
.input-group-glue + .form-control {
border-left: none;
}
<div class="input-group">
<button class="btn btn-default dropdown-toggle" type="button" id="menu1" data-toggle="dropdown">Codes
<span class="caret"></span></button>
<ul class="dropdown-menu" role="menu" aria-labelledby="menu1">
<li role="presentation"><a role="menuitem" tabindex="-1" href="#">A</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="#">S</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="#">N</a></li>
<li role="presentation" class="divider"></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="#">C</a></li>
</ul>
<span class="input-group-glue"></span>
<input type="text" class="form-control" value="test2" />
<span class="input-group-glue"></span>
<input type="text" class="form-control" value="test2" />
<asp:Button CssClass="btn btn-default" runat="server" Text="New Section" />
</div>
但是对齐不存在。 新手引导,任何方向都会有很大帮助。
【问题讨论】: