使用 Bootstrap,将多个按钮附加到一个.form-search
圆角两个附加按钮的右上角。
HTML:
<form class="form-search">
<div class="input-append">
<input type="text" class="span2 search-query">
<button type="submit" class="btn">Quick</button>
<button type="submit" class="btn">Full</button>
</div>
</form>
见http://jsfiddle.net/jhfrench/aFYcM/3/
如何调整 CSS,以便只有最后一个按钮获得圆角,中间按钮为“方形”?
就上下文而言,我可以将多个按钮附加到一个输入,并且只有最右边的按钮才能获得圆角:
<div class="alert alert-success">
Regular input can append two buttons such that the middle button ("Quick") does not have rounded corners:<br />
<form>
<div class="input-append">
<input type="text" class="span2">
<button type="submit" class="btn">Quick</button>
<a href="somewhere.html" class="btn">Full</a>
</div>
</form>
</div>