How can I get IE8 to accept a CSS :before tag?

前端 未结 3 2046
独厮守ぢ
独厮守ぢ 2020-12-15 10:24

I have the following CSS code

.editable:before {
    content: url(../images/icons/icon1.png);
    padding-right:5px;
}

this is used in conj

3条回答
  •  北荒
    北荒 (楼主)
    2020-12-15 11:18

    Update: I misread the page! IE 8 does support :before with images, it just doesn't when it is in IE7 compatibility mode.

    IE8 supports :before, but not and also images as content when not in compatibility mode. Kudos to @toscho for testing!

    • Source

    • Detailed comparison of which browsers can deal with what sort of content

    How I love quirksmode.org, which makes dealing with this stuff at least half-way bearable. The guy deserves a medal!

提交回复
热议问题