【发布时间】:2019-03-08 01:49:57
【问题描述】:
我有一些简单的 CSS,它使用属性 background-size 来强制背景填充页面。
body {
background-attachment: fixed;
background: url("/img/bg.jpg");
background-size: cover;
}
由于不支持 background-size 属性,此代码在 Internet Explorer 8 及更低版本上中断。使用this polyfill code,可以在此代码中添加 IE8 支持。但是,代码在 IE7 及更低版本上仍然会中断。
有什么解决办法吗?
【问题讨论】:
-
不要在 IE7 上浪费时间,它只有 0.01% 的用户。
标签: css internet-explorer cross-browser css-hack