如何在 Internet Explorer 9 开发人员工具中定位 ::before 和 ::after 伪元素?

How to target ::before and ::after pseudo elements in Internet Explorer 9 Developer Tools?

在 IE9 开发人员工具中检查元素时,我在 HTML 窗格中看不到我在 CSS 中定义的伪元素:

不过我可以在 CSS 窗格中看到它们,但是它们带有删除线,表明样式已被覆盖,因此在修改它们时没有任何效果。

如何在 IE9 中定位 ::before 和 ::after 元素进行检查?

注意:这似乎是 this question 的副本,但在我的例子中,元素是 div 容器元素,所以我认为该问题的答案不适用于此处。

引用另一个回答:

IE 9 supports the notations ::after and ::before (with two colons) in “standards mode”. In “quirks mode”, it does not.

所以唯一可能的原因是你的代码中的某些东西激活了“怪癖模式”