請在此處考慮下面的代碼,也給本琴:http://jsfiddle.net/DPNc6/如何設置整個按鈕集的寬度?
HTML:
<div style="width:500px" id="radio">
<input type="radio" id="radio1" name="radio" /><label for="radio1">Choice 1</label>
<input type="radio" id="radio2" name="radio" checked="checked" /><label for="radio2">Choice 2</label>
<input type="radio" id="radio3" name="radio" /><label for="radio3">Choice 3</label>
</div>
JS;
$('#radio').buttonset()
大家都可以看到,我試圖讓整個buttonset填補500像素的寬度,但使用這種風格的屬性似乎沒有做任何事情。如何將整個按鈕集的寬度設置爲一定數量的像素?
謝謝!