如何在 IE 中设置背景大小? [英] How do I make background-size work in IE?

查看:28
本文介绍了如何在 IE 中设置背景大小?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否有任何已知的方法可以使 CSS 样式 background-size 在 IE 中工作?

Is there any known way to make the CSS style background-size work in IE?

推荐答案

有点晚了,但这也很有用.有一个 IE 过滤器,适用于 IE 5.5+,您可以应用:

A bit late, but this could also be useful. There is an IE filter, for IE 5.5+, which you can apply:

filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(
src='images/logo.gif',
sizingMethod='scale');

-ms-filter: "progid:DXImageTransform.Microsoft.AlphaImageLoader(
src='images/logo.gif',
sizingMethod='scale')";

但是,这会缩放整个图像以适应分配的区域,因此如果您使用的是精灵,这可能会导致问题.

However, this scales the entire image to fit in the allocated area, so if you're using a sprite, this may cause issues.

规范:AlphaImageLoader 过滤器@microsoft

这篇关于如何在 IE 中设置背景大小?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆