css - 如何使用 Bootstrap 将多个输入字段放在一行中?

标签 css twitter-bootstrap twitter-bootstrap-3

是否有任何 bootstrap3 方法可以将所有这些文件放在一行中?如果可能的话,我也想保留 input-group 解决方案。

<div class="input-group">
    <input type="text" name="name" placeholder="Name" class="form-control" required>
    <input type="text" name="tel" placeholder="Phone" class="form-control">
    <input type="text" name="email" placeholder="E-mail" class="form-control">
    <button type="submit" class="btn btn-primary">
        <i class="fa fa-btn fa-plus"></i>
    </button>
</div>

如果没有 CSS 风格的黑客攻击,这可能吗?

最佳答案

你可以这样做

<div class="form-inline">
    <input type="text" name="name" placeholder="Name" class="form-control" required>
    <input type="text" name="tel" placeholder="Phone" class="form-control">
    <input type="text" name="email" placeholder="E-mail" class="form-control">
    <button type="submit" class="btn btn-primary">
        <i class="fa fa-btn fa-plus"></i>
    </button>
</div>

关于css - 如何使用 Bootstrap 将多个输入字段放在一行中?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44165686/

相关文章:

html - 我有一个 img 拒绝居中,我不知道为什么?

css - Bootstrap 面板作为容器并在手机上使用不同的样式

javascript - 使用 BootstrapDialog 进行 Bootstrap 切换

html - 如何让元素在 Flex 中堆叠?

javascript - 根据 CSS 尺寸调整 Flash 对象的大小? Coldfusion CFCHART CFDIV

javascript - 有没有办法在 jquery 中没有 id 的 img 标签上设置背景图片?

javascript - 带有 RichFaces 和 Bootstrap 的完全可点击的 Ajax 按钮

css - BootStrap的默认 anchor 标签样式如何传递

html - 消除 BootStrap 中的移动断点

javascript - 如何获取 unit_cost 并在相关下拉列表中插入带有 cat 名称的 sub_cat 名称?