内部表格我有两个单选按钮
<fieldset data-role="controlgroup">
<legend>
Choose a pet:
</legend>
<input type="radio" name="radio-choice-1" id="radio-choice-1" value="choice-1" checked="checked" />
<label for="radio-choice-1"><img src="../static/images/Dog.png" />Dog</label>
<input type="radio" name="radio-choice-1" id="radio-choice-2" value="choice-2" />
<label for="radio-choice-2"><img src="../static/images/Cat.png" />Cat</label>
</fieldset>
(我正在使用 jquery 移动版)。如何使这两个按钮水平而不是垂直(目前狗按钮在猫上方,我需要排成一排)。如何制作横向?
最佳答案
在字段集中试试这个
<fieldset data-role="controlgroup" data-type="horizontal" >
来源http://jquerymobile.com/demos/1.0a4.1/docs/forms/forms-radiobuttons.html
从这个站点验证部分 Horizontal radio button sets
关于javascript - 如何使单选按钮在字段集中水平,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16103213/