0

在表单里面我有两个单选按钮,比如

            <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 mobile)。如何使这两个按钮水平而不是垂直(此时狗按钮在猫上方,我需要排成一行)。怎么做横版?

4

1 回答 1

3

在字段集中试试这个

<fieldset data-role="controlgroup" data-type="horizontal" >

来源http://jquerymobile.com/demos/1.0a4.1/docs/forms/forms-radiobuttons.html

形成这个站点验证部分水平单选按钮集

于 2013-04-19T11:12:37.530 回答