【问题标题】:jquery mobile radio buttons controlgroup fluid widthjQuery移动单选按钮控制组流体宽度
【发布时间】:2014-03-27 01:11:49
【问题描述】:

为了在 jquery mobile 中创建流畅的水平单选按钮,我必须覆盖哪些类?

【问题讨论】:

    标签: jquery-mobile radio-button


    【解决方案1】:

    “流畅的水平单选按钮”是什么意思?

    也许this可以帮到你,它是JQM正文元素的备忘单。

    这是一个例子:

    <div data-role="fieldcontain">
    <fieldset data-role="controlgroup" data-type="horizontal">
        <legend>Choose:</legend>
            <input type="radio" name="radio" id="radio1" value="1" checked="checked" />
            <label for="radio1">option 1</label>
            <input type="radio" name="radio" id="radio2" id="radio2" value="2"  />
            <label for="radio2">option 3</label>
            <input type="radio" name="radio" id="radio3" id="radio3" value="3"  />
            <label for="radio3">option 4</label>
    </fieldset>
    </div>
    

    它看起来像这样:

    【讨论】:

      【解决方案2】:
      <fieldset data-role="controlgroup"  data-type="horizontal"  >
              <input type="radio" name="nemprunteurs" id="nemprunteurs1" value="1"  checked="checked">
              <label for="nemprunteurs1">1 emprunteur</label>
               <input type="radio" name="nemprunteurs" id="nemprunteurs2" value="1"  >
             <label for="nemprunteurs2">2 emprunteurs</label> 
      </fieldset>
      

      解决

      #blocemprunteur  .ui-controlgroup-controls { width: 100% !important; }
      #blocemprunteur .ui-radio{width:50% !important;}
      

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2013-05-28
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2013-02-28
        • 2022-01-09
        相关资源
        最近更新 更多