Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/html/83.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript IE8背景大小不工作_Javascript_Html_Css_Background_Internet Explorer 8 - Fatal编程技术网

Javascript IE8背景大小不工作

Javascript IE8背景大小不工作,javascript,html,css,background,internet-explorer-8,Javascript,Html,Css,Background,Internet Explorer 8,我正在努力填补我的形象适合的DIV大小。 我已经发现“背景大小:包含”不适用于Internet Explorer 8 对于我的特定代码是否有可能的解决方法 .thumb { /* Select a maximum height and width to allot for each thumbnail. Set margin size here as well. */ height: 125px; width: 135px;

我正在努力填补我的形象适合的DIV大小。 我已经发现“背景大小:包含”不适用于Internet Explorer 8

对于我的特定代码是否有可能的解决方法

    .thumb {
        /* Select a maximum height and width to allot for each thumbnail. Set margin size here as well. */
        height: 125px;
        width: 135px;
        /* Do not edit these properties. */
        background-size: contain;
        background-position: center;
        background-repeat: no-repeat;
    }
在我的javascript中:

            $('.thumb:' + place).css("background-image", 'url(' + entry.thumbnailURL + ')');
            $('.thumb:' + place).css("filter", 'progid:DXImageTransform.Microsoft.AlphaImageLoader(src=' + entry.thumbnailURL + ',sizingMethod='scale')');
            $('.thumb:' + place).css("-ms-filter", 'progid:DXImageTransform.Microsoft.AlphaImageLoader(src=' + entry.thumbnailURL + ',sizingMethod='scale')');

由于这两个位,您会得到一个
意外的标识符

 ',sizingMethod='scale')');
你必须把它改成

',sizingMethod=\'scale\')');


IE8不支持它。可能重复我已更新我的javascript源代码。使用此代码,我得到一个“意外标识符”
',sizingMethod="scale")');