首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >jquery移动水平单选按钮等于页面宽度百分比

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

Stack Overflow用户
提问于 2012-03-25 01:14:06
回答 1查看 1.5K关注 0票数 0

嗨,我在移动应用程序中,我试图创建一个水平单选按钮全宽度与33%的每个按钮。

以下是我的代码

代码语言:javascript
复制
                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如下所示

代码语言:javascript
复制
.row_b .ui-btn {
    text-align: center;
    width: 33%;
}

敬请指教

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2012-06-12 17:31:38

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

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/9853746

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档