问题描述
我们在网站上注意到CSS被IE11破坏了,而它在IE10上运行良好。看看CSS源后,事实证明IE11(似乎)已经放弃了对属性匹配器的支持:我们尝试了我们的VM,我们尝试使用BrowserStack,结果就是这些规则......
We noticed on our website that the CSS was broken with IE11, while it worked fine with IE10. After a look at the CSS source, it turns out that IE11 (it seems) has dropped its support for attributes matchers: we tried on our VM, we tried on BrowserStack, and the result is that these rules...
img[src$='separator.png'] { display: none; }
a[href="javascript:addBookemart()"] { text-decoration: none; }
...在IE10上工作,但在IE11上不再工作。我发现很难相信对这个功能的支持会被删除......而且,我找不到任何人在互联网上谈论这样的事情。可能还有其他原因造成这个问题吗?
... do work on IE10, but not anymore on IE11. I find it hard to believe that the support for this feature would've been dropped... plus, I can't find anyone talking about such a thing over the interwebs. Might there be anything else causing this issue?
这是一支用于测试目的的笔:
Here's a pen for testing purposes:
推荐答案
我发现我遇到了这个问题,结果发现IE11的属性值区分大小写。
I found I was having this issue and it turned out that IE11 was case sensitive with the attribute values.
这篇关于CSS中的属性匹配器不适用于IE11的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!