jquery 移动水平单选按钮等于按钮页面宽度百分比

标签 jquery css styles radio-button

您好,我在移动应用程序中,我正在尝试创建一个水平单选按钮全宽,每个按钮占 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%;
}

请多多指教

最佳答案

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

关于jquery 移动水平单选按钮等于按钮页面宽度百分比,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9853746/

相关文章:

javascript - jquery 属性选择点击不起作用

html - iPad/ios6 不渲染 png 背景图片

c# - 背景属性不指向路径 '(0).(1)' 中的依赖对象

css - 如何去除 Firefox 中按钮周围的蓝色边框?

javascript - Google Map API v3 - 超出最大调用堆栈大小

javascript - 在 jquery 中查找数据

jquery - 在 jquery 中搜索

javascript - 跨浏览器的弧形边框

javascript - 使用 jQuery 检索 CSS 百分比值

android - 在自定义 View 中提供默认样式(属性)