【问题标题】:Rounded check box using Jquery mobile使用 Jquery mobile 的圆形复选框
【发布时间】:2012-03-26 07:41:12
【问题描述】:

我正在尝试使用 Jquery mobile 创建圆形样式复选框。在下面的链接中,在多项选择下,选择选项选择菜单,我看到了这种类型的复选框。是否可以在 JQM 的列表视图中创建该类型的复选框?

http://jquerymobile.com/test/docs/forms/selects/custom.html#&ui-state=dialog

谢谢...

【问题讨论】:

    标签: jquery-mobile checkbox


    【解决方案1】:
    <ul data-role="listview" id="options">
        <li data-icon="checkbox-off"><a>test</a></li>
        <li data-icon="checkbox-on"><a>test</a></li>
    </ul>
    

    【讨论】:

    • 感谢您的回复。是的,我需要这样的复选框,但不是图标格式。用户还应该根据自己的意愿启用或禁用复选框,而不是上面的默认开/关状态。我想以圆形格式设置 JQM 表单元素复选框的样式。这可能吗?
    【解决方案2】:

    这段代码 sn-p 为列表视图制作圆边,你可以在其中包含任何元素:

    <ol data-role="listview">
                        <li class="ui-corner-bottom ui-corner-top" data-theme="a" ><a href="#">List Item 1</a></li>
                        <li class="ui-corner-bottom ui-corner-top" data-theme="a"><a href="#">List Item 2</a></li>
                        <li class="ui-corner-bottom ui-corner-top" data-theme="a"><a href="#">List Item 3</a></li>
        </ol>
    

    在此处查看演示

    http://jsfiddle.net/qXr79/5/

    【讨论】:

      猜你喜欢
      • 2016-06-23
      • 2011-12-27
      • 1970-01-01
      • 2012-03-10
      • 1970-01-01
      • 2021-10-22
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多