【问题标题】:jquery mobile horizontal radiobutton equal buttons width percentage of pagejquery mobile 水平单选按钮等于页面的按钮宽度百分比
【发布时间】:2012-03-24 17:14:05
【问题描述】:

您好,我在移动应用程序中,我正在尝试创建一个水平单选按钮全宽,每个按钮 33%。

这是我的代码

                items.push('<div id="id' + i + '" data-role="fieldcontain"><fieldset data-role="controlgroup" data-type="horizontal" class="row_b">');
                items.push('<input type="radio" name="radio'+ i +'-choice-1" id="radio'+ i +'-choice-1" value="choice_1" /><label for="radio'+ i +'-choice-1">test1</label>');
                items.push('<input type="radio" name="radio'+ i +'-choice-1" id="radio'+ i +'-choice-2" value="choice_2" /><label for="radio'+ i +'-choice-2">test2</label>');
                items.push('<input type="radio" name="radio'+ i +'-choice-1" id="radio'+ i +'-choice-3" value="choice_3"/><label for="radio'+ i +'-choice-3">Clear</label>');
                items.push('</fieldset></div>');

                html += items.join('');

                list.append(html).trigger('create');

我尝试了这个解决方案JQueryMobile radio buttons with fieldcontain width issue on desktop,但它对我不起作用...

我的html如下

.row_b .ui-btn {
    text-align: center;
    width: 33%;
}

请指教

【问题讨论】:

    标签: jquery css styles radio-button


    【解决方案1】:

    直到今晚我才有时间亲自尝试这个,但我有同样的问题,这个链接可能会解决我们的问题:http://the-jquerymobile-tutorial.org/jquery-mobile-tutorial-CH13.php

    【讨论】:

      猜你喜欢
      • 2013-01-14
      • 2011-04-29
      • 2011-12-24
      • 1970-01-01
      • 2013-01-16
      • 1970-01-01
      • 1970-01-01
      • 2023-03-05
      • 2017-03-03
      相关资源
      最近更新 更多