gpt4 book ai didi

html - Bootstrap 样式不适用于 HTML

转载 作者:太空宇宙 更新时间:2023-11-04 10:11:24 24 4
gpt4 key购买 nike

<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。

enter image description here

我已经用我的“本地”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>

关于html - Bootstrap 样式不适用于 HTML,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37565911/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com