【问题标题】:CSS3 Internet Explorer Scale Background filter:CSS3 Internet Explorer 缩放背景过滤器:
【发布时间】:2011-05-16 05:37:07
【问题描述】:

我正在尝试拉伸背景图像,使其始终填满窗口。

我使用 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>

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');
}

我使用的是 IE8。

【问题讨论】:

    标签: internet-explorer filter background css


    【解决方案1】:

    我想通了。

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

    【讨论】:

      猜你喜欢
      • 2012-07-13
      • 1970-01-01
      • 2023-03-07
      • 1970-01-01
      • 2018-05-29
      • 1970-01-01
      • 2011-09-15
      • 1970-01-01
      • 2013-04-04
      相关资源
      最近更新 更多