IE 8:使用-ms-filter的background-size修复 [英] IE 8: background-size fix with -ms-filter

查看:147
本文介绍了IE 8:使用-ms-filter的background-size修复的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在Stackoverflow上发现了相同的问题,并发布了一个修复: http://stackoverflow.com/a/9169401/1107123

I found the same problem on Stackoverflow and a fix was posted: http://stackoverflow.com/a/9169401/1107123

我可以让它工作,但是一旦使用PHP它不会。

I can make it work, but as soon I'm using it with PHP it does not.

有任何想法?

我也看过这个: http:/ /stackoverflow.com/a/10147089/1107123
但是我不知道如何实现它。文档非常模糊:/

I also looked at this: http://stackoverflow.com/a/10147089/1107123 But I have no idea how to implement it. The documentation is very vague :/

这不起作用:(PHP内部)

This does not work: (Inside PHP)

echo "<div style="filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='img.gif',sizingMethod='scale'); -ms-filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='img.gif',sizingMethod="scale');'></div>";

这种方法很好:(HTML)

This works just fine: (HTML)

<div style="filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='img.gif',sizingMethod='scale'); -ms-filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="img.gif",sizingMethod="scale");"></div>

原始代码:

echo        "<div class='sponsorImage' style='background-image:url($row[piclink]);'></div>";

如何对此使用-ms-filter?

How do I use the -ms-filter with this?

推荐答案

这不关心PHP / RubyRails或任何 - css兼容浏览器 - 试试这一个 http://pastebin.com/RZ0krHj0

It's not concern of PHP/RubyRails or whatever- it all about css compatibility with browsers - Try out this one http://pastebin.com/RZ0krHj0,

这篇关于IE 8:使用-ms-filter的background-size修复的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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