如何让IE8接受css:before标签? [英] How can I get IE8 to accept a css :before tag?
问题描述
我有以下CSS代码
.editable:before {
content: url(../images/icons/icon1.png);
padding-right:5px;
}
这是使用连词与下面的标记:
this is used in conjuntion with the following markup:
<span class="editable"></span>
在我的图标出现在世界的每一个其他祝福的浏览器,但IE8似乎有一个问题,这个。是不是:之前
伪元素CSS2?不是 content:
也是CSS2命令?
In every other blessed browser in the world my icon is appearing, but IE8 seems to have a problem with this. Isn't the :before
pseudo-element CSS2? isn't content:
also a CSS2 command? what gives?
推荐答案
更新:我误读了页面!
Update: I misread the page! IE 8 does support :before with images, it just doesn't when it is in IE7 compatibility mode.
p> IE8支持:之前
,但不是以及图像作为不兼容模式下的内容。荣誉给@toscho测试!
IE8 supports :before
, but not and also images as content when not in compatibility mode. Kudos to @toscho for testing!
-
的来源
我如何爱quirksmode.org,这使得处理这个东西至少半途可爱。这个家伙应该得到一枚奖牌!
How I love quirksmode.org, which makes dealing with this stuff at least half-way bearable. The guy deserves a medal!
这篇关于如何让IE8接受css:before标签?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!