如何重置或覆盖 IE CSS 过滤器? [英] How do I reset or override IE CSS filters?

查看:23
本文介绍了如何重置或覆盖 IE CSS 过滤器?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用专有的 MS 'filter' 属性来尝试创建一个与 css3 text-shadow 和 box-shadow 等效的非难看的东西;

I'm using the proprietry MS 'filter' property to try and create a non ugly equivalent to css3 text-shadow and box-shadow;

在遇到这个问题之前,我实际上做得很好.看起来当我将过滤器应用于另一个也有过滤器的 div 内的 div 时,过滤器效果最终会组合在子对象上.

I was actually doing really well until I hit this problem. It looks like when I apply a filter to a div inside another div which also has a filter the filter effects end up being combined on the child object.

我试过使用 filter:none;做一个重置但没有快乐.我还尝试了不同的语法变体,即-ms-filter: 'progid:...Glow()'"、filter: progid:...Glow()"、filter: Glow()"等等.

I've tried using filter:none; to do a reset but no joy. I've also tried different variations on the syntax, ie "-ms-filter: 'progid:...Glow()'", "filter: progid:...Glow()", "filter: Glow()", etc..

在 IE8 中测试

推荐答案

通过绝对或相对定位孩子,我取得了一些成功.这似乎并没有更早地起作用,所以一旦我变得更复杂它可能会再次中断

I've had some success by positioning the children absolute or relative. This didn't seem to work earlier though so it may break again once I get more complicated

我认为一旦父级应用了过滤器,它的所有子级本质上都会在内部成为 Directx 表面.您仍然可以选择文本,但它会滞后.我认为文本选择是一种技巧,它使每个字母成为一个单独的表面.这真是一团糟,这对解释为什么一般的浏览器和特别是过滤器如此有问题大有帮助.

I think once a parent has a filter applied all of it's children essentially become directx surfaces internally. You can still select text but it lags. I think text selection is a hack which makes each letter a seperate surface. It's a shitty mess which goes a long way to explaining why the browser in general and filters in particular are so buggy.

这篇关于如何重置或覆盖 IE CSS 过滤器?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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