[英]bootstrap input form-control
Is there anyway to get boostrap's form-control
for input
to be inline without using the grid system ie col-md-2
? 无论如何,有没有使用网格系统即
col-md-2
就能获得boostrap的form-control
以使其input
为内联的?
Because this is the only feature of bootstrap that I find astoundingly annoying. 因为这是Bootstrap的唯一功能,所以我感到非常烦人。
You can try is :- 您可以尝试的是:-
<form class="form-inline">
<div class="form-group">
<label for="email">Email address:</label>
<input type="email" class="form-control" id="email">
</div>
<div class="form-group">
<label for="pwd">Password:</label>
<input type="password" class="form-control" id="pwd">
</div>
<button type="submit" class="btn btn-default">Submit</button>
</form>
It should work.... there's a class .form-inline to make the form-control display inline. 它应该工作...。有一个类.form-inline使表单控件内联显示。
Here's how I made a workaround. 这是我的解决方法。
<input type="text" class="input-sm" style='box-shadow: none; border: 1px solid lightgray'>
This makes it look like bootstrap's text input without it taking up an entire row or requiring you to play with the grid system. 这使得它看起来像引导程序的文本输入,而不占用整个行或要求您使用网格系统。
If anyone has a better answer feel free to make your input 如果有人有更好的答案,请随时输入您的意见
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.