<div class="form-inline">
<div class="form-group ">
<label for="txtTitle" class="control-label">
<p class="text-info">Page Title</p>
</label>
<asp:textbox id="txtTitle" tabindex="14" runat="server" MaxLength="60" TextMode="SingleLine" CssClass="form-control input-sm"></asp:textbox>
</div>
</div>
我拥有 HTML 的和平 - 它应该是内联表单,但是 form-inline
的样式没有应用,即使包含了 bootstap。
我已经用我的“本地”bootstap 和来自 cdn 的 bootstrap 试过了但一切都无法正常工作。
我的问题在哪里?
来自 Bootstrap's文档:
Add .form-inline to your form (which doesn't have to be a ) for left-aligned and inline-block controls. This only applies to forms within viewports that are at least 768px wide.
如果您将在Full Page 模式下运行以下代码,您将看到正在应用inline-form
样式。
.control-label .text-info {
margin: 0;
}
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" rel="stylesheet"/>
<div class="form-inline">
<div class="form-group ">
<label for="txtTitle1" class="control-label">
<p class="text-info">Page Title</p>
</label>
<input type="text" id="txtTitle1" tabindex="14" MaxLength="60" TextMode="SingleLine" class="form-control input-sm">
</div>
<div class="form-group ">
<label for="txtTitle2" class="control-label">
<p class="text-info">Page Title</p>
</label>
<input type="text" id="txtTitle2" tabindex="14" MaxLength="60" TextMode="SingleLine" class="form-control input-sm">
</div>
<div class="form-group ">
<label for="txtTitle3" class="control-label">
<p class="text-info">Page Title</p>
</label>
<input type="text" id="txtTitle3" tabindex="14" MaxLength="60" TextMode="SingleLine" class="form-control input-sm">
</div>
</div>
我是一名优秀的程序员,十分优秀!