0
我使用jQuery UI buttonset如下jQuery的ButtonSet尺寸发出
<div id="radioSet">
<input type="checkbox" id="radio1" name="radio" /><label for="radio1">A</label>
<input type="checkbox" id="radio2" name="radio" checked="checked" /><label for="radio2">Choice 2 - long long</label>
<input type="checkbox" id="radio3" name="radio" /><label for="radio3">Choice 3</label>
</div>
$(document).ready(function() {
$("#radioSet").buttonset().find('label').css({ 'width': '100px', 'height': '100px'});
});
按钮组布局具有上述代码问题(不规则放置)。布局工作正常如果我减少文本长度(或增加宽度),以便文本适合按钮而不需要包装。看来文本换行导致了这个问题。
如何在按钮组中实现大小相同的按钮?
看起来不错。我试过jsfiddle上的代码,它工作正常。在使用上述代码动态调整大小后,我仍然在应用程序中遇到问题;目前我正在调试。 – byte 2012-03-07 12:39:12