我想让水平单选按钮变成整个屏幕的宽度,我引用的是http://jquerymobile.com/demos/1.2.0/docs/forms/radiobuttons/,我的代码如下:
<div>
<fieldset data-role="controlgroup" data-type="horizontal">
<input type="radio" name="radio-choice-1" id="spent_money_1" value="choice-1" checked="checked" /> <label for="spent_money_1">Spent Some $</label>
<input type="radio" name="radio-choice-1" id="made_money_1" value="choice-2"/>
<label for="made_money_1">Made Some $</label>
</fieldset>
</div>我试着在div、fieldset和input中都放入style=“宽度:100%”,但也没有帮助。请多多指教。谢谢!
干杯,马克
发布于 2012-11-12 06:40:04
我一直都有同样的问题。添加下面的CSS对我来说很有效。
本例用于4个单选按钮,因此我使用25%的宽度作为ui-radio。
.ui-controlgroup-controls
{
width:100%;
}
.ui-radio {
width:25%;
}发布于 2013-04-16 13:14:00
在一般情况下,您不想指定宽度(适用于1.3.0)
.ui-controlgroup-controls
{
display: table;
width: 100%;
}
.ui-controlgroup-controls .ui-radio
{
display: table-cell;
float: none;
}https://stackoverflow.com/questions/12749889
复制相似问题