Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/html/87.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

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/css/41.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
Html 背景尺寸的polyfill在IE8中不起作用?_Html_Css_Internet Explorer 8_Background Size - Fatal编程技术网

Html 背景尺寸的polyfill在IE8中不起作用?

Html 背景尺寸的polyfill在IE8中不起作用?,html,css,internet-explorer-8,background-size,Html,Css,Internet Explorer 8,Background Size,我有一个简单的代码: <html style = "height: 100%;"> <head> <meta http-equiv = 'Content-Type' content = 'text/html; charset = windows-1251' /> <title>test bg</title> </head> <body style = "heig

我有一个简单的代码:

<html style = "height: 100%;">
    <head>
        <meta http-equiv = 'Content-Type' content = 'text/html; charset = windows-1251' />
        <title>test bg</title>
    </head>

    <body style = "height: 100%; margin: 0px;">
        <div id = 'div_0' style = "width: 100%; height: 100%; background-size: contain; -ms-behavior: url(backgroundsize.htc); background-repeat: no-repeat; background-position: center center; background-image: url(storage/zast_800x600.jpg);"></div>
    </body>
</html>

测试背景
加载页面时没有任何错误。但是背景和没有这个东西的情况一样

.htaccess
backgroundsize.htc
与html页面位于同一文件夹中。我通过双击html页面在本地运行此文件

我使用作为参考

.htaccess
不会在Windows文件系统中执行任何操作,例如为IE提供正确MIME类型的文件,这是
.htc
文件执行任何操作所必需的。您需要将其放置在运行的Apache服务器中;这是服务器要执行的指令列表

如果您没有访问开发服务器或其他已经建立的东西的权限,您可以尝试或使用其他方法来运行本地Apache服务器


事实证明,真正的答案是在GitHub的其他地方找到的。询问者没有在标准模式下运行,导致
ms行为:
声明失败;怪癖模式只识别
行为:

是请尝试以上编辑并查看是否正确works@Richa-那没用。而且仍然没有任何错误。你能给一个演示页面或工作降级吗?嗯,我不知道怎么做,但程序包中的index.html页面就是这样工作的。我通过双击从文件夹启动它,图像在IE8中正确调整大小。