【问题标题】:iCheck Checkbox doesn't work on mobileiCheck Checkbox 在移动设备上不起作用
【发布时间】:2016-07-14 18:02:07
【问题描述】:

你好有a login site

在浏览器上运行良好。但是,当我在手机上看到它时,它并没有显示复选框。

这是 iCheck 复选框的脚本。如果我删除它,它会在移动设备上显示原始复选框。

$(function () {
        $('input').iCheck({
            checkboxClass: 'icheckbox_square-blue',
            radioClass: 'iradio_square-blue',
            increaseArea: '20%' // optional
        });
    });

请你看一下。谢谢,

【问题讨论】:

    标签: javascript jquery checkbox icheck


    【解决方案1】:

    用于视网膜支持的 css 文件 (blue.css) 存在错误。背景图像链接已损坏。

    background-image: url(blue.png);
    

    应该在 blue.css 中正确

    /* Retina support */
    @media only screen and (-webkit-min-device-pixel-ratio: 1.5),
    only screen and (-moz-min-device-pixel-ratio: 1.5),
    only screen and (-o-min-device-pixel-ratio: 3/2),
    only screen and (min-device-pixel-ratio: 1.5) {
        .icheckbox_square-blue,
        .iradio_square-blue {
            background-image: url(blue.png);
            -webkit-background-size: 240px 24px;
            background-size: 240px 24px;
        }
    }
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2022-01-12
      • 2014-04-22
      • 1970-01-01
      • 2017-07-27
      • 1970-01-01
      • 1970-01-01
      • 2019-07-31
      • 2016-08-11
      相关资源
      最近更新 更多