IE10:在'visibility:hidden'元素的伪元素之前的'visibility:visible' [英] IE10: 'visibility:visible' on before pseudo-element of 'visibility:hidden' element

查看:210
本文介绍了IE10:在'visibility:hidden'元素的伪元素之前的'visibility:visible'的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我用 visibility:hidden 制作了一个 DIV ,并附上了一个 ::之前此DIV的伪元素为 visibility:visible 。这可以在Firefox,Chrome和Safari中按预期工作,但在Internet Explorer 10中,伪元素无法呈现。

请详细解释一下,如果我完成了这个错误,或者这是否是Internet Explorer的问题。是否有任何解决方法(我们只能访问CSS,而不是源HTML)?

JSFiddle展示问题

解决方案

过滤器不适用于IE中的伪元素。

阅读:

 其他指定样式属性适用于插入内容的外观,而不适用于其他指定样式属性元素的内容。 





IE吮吸,处理它。
我认为唯一的方法就是将隐藏文字颜色改为你的背景颜色,你知道其余的......

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.

解决方案

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...

这篇关于IE10:在'visibility:hidden'元素的伪元素之前的'visibility:visible'的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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