Javascript无法在iOS设备上运行

时间:2017-08-02 13:48:53

标签: javascript jquery ios

我正在尝试使用窗口调整大小来调整没有CSS的图像大小。但它不适用于iOS设备。为什么Chrome开发者工具和Android设备上运行的代码无法在iOS设备上运行?

注意:我已经尝试过CSS媒体查询,但它们无法正常工作

function imgSize(gen) {
    console.log(gen);
    $("#mainSlider li img").each(function (i) {
        var img = $(this);
        if (gen<=768) {
            $(img).attr("style", "height: 100%!important; max-height: 270px!important;");
            $(".slider").attr("style", "margin:0 auto;height:310px");
        }
        else {
            $(img).attr("style", "height: 100%!important; max-height: 523px!important;");
            $(".slider").attr("style", "margin: 0 auto!important;height: 583px!important;");
        }

    });
}

search.luceneSearch("PATH_OF_THE_FOLDER")

0 个答案:

没有答案
相关问题