我想创建一个按钮组,既可以放置多个按钮,也可以只放置一个按钮。
这里有一个示例:http://jsfiddle.net/jssq20gn/
以下是html代码:
<!--THIS IS HOW IT SHOULD WORK FOR WHEN THERE IS THREE BUTTONS-->
<article>
<div class='btn-group'>
<a class='button'>Test</a>
<a class='button'>Test</a>
<a class='button'>Test</a>
</div>
</article>
<!--THIS WORKS TOO-->
<article>
<div class='btn-group'>
<a class='button'>Test</a>
<a class='button'>Test</a>
</div>
</article>
<!--THIS DOESN'T WORK, should have rounded borders-->
<article>
<div class='btn-group'>
<a class='button'>Test</a>
</div>
</article>
如果有多个按钮,这将起作用,但是当只有一个按钮时,该按钮并没有在所有边角上都有圆角。