问题
I have made a DIV
with visibility: hidden
and attached a ::before
pseudo-element of this DIV with visibility: visible
. This works as expected in Firefox, Chrome and Safari, but in Internet Explorer 10 the pseudo-element does not render.
Please explain if I'm accomplishing this wrong, or whether this is an issue with Internet Explorer. Are there any work arounds (we only have access to the CSS, not the source HTML)?
JSFiddle demonstrating issue.
回答1:
Filters don't work on pseudo elements in IE.
Read:
msdn
Other specified styling properties apply to the appearance of the inserted content, not to the element's content.
IE sucks, deal with it.
I think the only way is to change the "hidden text" color to your background color, and you know the rest...
来源:https://stackoverflow.com/questions/17530947/ie10-visibilityvisible-on-before-pseudo-element-of-visibilityhidden-eleme