如何保持 bootstrap 表单按钮内联

how to keep bootstrap form button inline

当我将此按钮放在表单中时,它会开始一个新行,但我希望它显示内联。我尝试添加 class="form-inline" 但它不起作用。我一定不擅长在线搜索,因为我自己找不到正确的答案。

保持内联的 bootstrap 约定是什么?

<div class="col-sm-12">
<table>
    <thead>
        <tr>
            <th>Edit</th>
        </tr>
    </thead>
    <tbody>
        <tr>
            <td>
                <a class="inline btn btn-info btn-xs glyphicon glyphicon-pencil"></a>
                <button class="form-inline glyphicon glyphicon-trash btn btn-xs btn-danger del" type="button"></button>                 
            </td>
        </tr>
    </tbody>
</table>

Fiddle

只需稍微更改您的标记即可:

喜欢this demo

<td> 
    <form class="form-inline" method="POST">
        <a class="btn btn-info btn-xs glyphicon glyphicon-pencil"></a>
        <button class="glyphicon glyphicon-trash btn btn-xs btn-danger del" type="button"></button>
    </form>
</td>