我想通过twitter bootstrap获得2个单选按钮组。但我只能从我拥有的四个按钮中选择一个值。它们充当单个单选按钮组而不是2个单独的组。我添加了一个不同的名称字段,仍然它们表现为单个组。我错过了什么?
<label>Question 1?</label>
<div id="build-type" class="btn-group radio-space" data-toggle="buttons-radio">
<button type="button" id="build-maven" name="build-type" class="btn btn-default btn-group-justified">maven</button>
<button type="button" id="build-ant" name="build-type" class="btn btn-default btn-group-justified">ant</button>
</div>
<label>Questions 2?</label>
<div id="test-framework" class="btn-group radio-space" data-toggle="buttons-radio">
<button type="button" id="test-yes" name="test-framework" class="btn btn-default btn-group-justified">Yes</button>
<button type="button" id="test-no" name="test-framework" class="btn btn-default btn-group-justified">No</button>
</div>
自定义CSS
.radio-space{
width: 60%;
}