Is there a way to make IE8 honour opacity on an `:before` pseudo element?

前端 未结 1 1952
离开以前
离开以前 2020-12-16 17:31

I have this simple CSS...

div:before {
    content: \"G\'day\";   
    filter: alpha(opacity=40);
    -moz-opacity: .4;
    opacity: .4;
}

1条回答
  •  温柔的废话
    2020-12-16 17:57

    I don't think it's possible.

    I had the same problem a while back, and I ended up just working around it (by not using :before).

    Here's some sound reasoning as to why it's not possible: Why does a filter gradient on a pseudo element not work in IE8?

    0 讨论(0)
提交回复
热议问题