CSS中的属性匹配器不适用于IE11 [英] Attribute matchers in CSS don't work with IE11

查看:110
本文介绍了CSS中的属性匹配器不适用于IE11的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们在网站上注意到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:

http://codepen.io/anon/pen/GJNyJW

推荐答案

我发现我遇到了这个问题,结果发现IE11的属性值区分大小写。

I found I was having this issue and it turned out that IE11 was case sensitive with the attribute values.

这篇关于CSS中的属性匹配器不适用于IE11的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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