Internet explorer CSS3 Internet Explorer缩放背景过滤器:

Internet explorer CSS3 Internet Explorer缩放背景过滤器:,internet-explorer,filter,background,css,Internet Explorer,Filter,Background,Css,我试图拉伸背景图像,使其始终充满窗口 使用CSS3,我在mozilla和chrome中进行了管理,但我在IE中遇到了困难。我以前在IE中进行过管理,但这次它不起作用,以下是我的HTML和CSS: HTML5: <!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <meta name="description" content=""

我试图拉伸背景图像,使其始终充满窗口

使用CSS3,我在mozilla和chrome中进行了管理,但我在IE中遇到了困难。我以前在IE中进行过管理,但这次它不起作用,以下是我的HTML和CSS:

HTML5:

<!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="utf-8">
        <meta name="description" content="">
        <title>IndieCity.com Signup</title>
        <!-- CSS gets included here -->
    </head>
    <body>
         <div id="background"></div>
    </body>
</html>
我正在使用IE8。

我找到了答案

使用过滤器时图像的路径是相对于HTML页面而不是CSS文件的

div#background {
    position: absolute;
    top: 0px;
    left: 0px;
    width: 100%;
    height: 100%;
    min-width: 1024px;
    min-height: 768px;
    display: block;
    background: url(../img/theme1.jpg) no-repeat;
    background-size: 100%;
    -moz-background-size: 100%;
    filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='../img/theme1.jpg', sizingMethod='scale');
}