如何让IE8接受css:before标签? [英] How can I get IE8 to accept a css :before tag?

查看:804
本文介绍了如何让IE8接受css:before标签?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有以下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屋!

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