【发布时间】:2019-10-14 19:47:24
【问题描述】:
I want something just like this. But if it is showing below the input fields。我下面的代码显示输入字段,但我希望它们都在同一行。我们该怎么做?
<div class="form-group">
<label for="price">Price</label>
<input type="number" class="form-control" name="price" placeholder="Price">
<a class="btn">X</a>
</div>
【问题讨论】:
-
在 HTML 示例中您只有一个
input。假设您实际上有多个实例,然后删除块级div元素包装器,或在 CSS 中将其设置为display: inline-block;,或使用span或其他一些内联元素。label也是如此,因为这也是块级 -
X 不在输入字段下方显示的同一行,但我也使用 span
-
请向我们展示您尝试过的内容以及所有相关的 CSS
标签: jquery html bootstrap-4