4
5

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

IE9.jsを使ったIE8でfirst-child:beforeが効かない問題を解消する

4
Last updated at Posted at 2013-09-17

IE9.js(v2.1 beta4)を使った状態で、IE8では例えば以下の様なcssは効きません。

sample.css
li:first-child:before {
    display: none;
}

非常に困りますので修正します。

IE9.js
IE7.CSS.pseudoClasses += "(?:first|last|only)\\-(?:child|of\\-type)|empty|root|target|" +

srcファイルでは2333行目を下記のように書き換えます。

IE9.js
IE7.CSS.pseudoClasses += "(?:last|only)\\-(?:child|of\\-type)|empty|root|target|" +

first| を削除します。
ひとまず、これで動作する様になりました。

出典:
:first-child:before content bug in IE9.js
https://code.google.com/p/ie7-js/issues/detail?id=267

4
5
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
4
5

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?