【发布时间】:2011-08-19 05:30:20
【问题描述】:
我知道IE7不支持background-size cover。
我在网上搜索了一些解决方案,但我唯一得到的是我应该将img 与width: 100% 和height:100% 放在一起作为背景。
这是唯一的解决方案吗?我已经看到-ms-filter 的一些解决方案,但它没有用。有人有其他解决方案吗?
1 特别之处:
我有超过 1 个 div 有这个 background-size 封面属性。
在 Firefox 中一切正常(多么令人惊讶)。
Edit1:我的代码如下所示:
<div class="section" id="section1">here should be the first picture as the background!!</div>
<div class="section" id="section2">here should be the second picture as the background!!</div>
<div class="section" id="section3">here should be the third picture as the background!!</div>
【问题讨论】:
-
@sandeep,你的意思是第一个 ie-fix 吗?
-
@Sai:嗯,我的意思是位置......无论如何它应该在ie中工作。每个人都知道我的意思..
-
@eav,用于 ff、chrome 等和 IE 的封面属性,您可以使用与封面属性相同效果的过滤器。
-
@sandeep,我的 css 中并没有这个代码: filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='../img/kiesel.jpg', sizingMethod='scale') ; !important -ms-filter: "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='../img/kiesel.jpg', sizingMethod='scale')"; !重要
标签: internet-explorer internet-explorer-7 css