IE7 IE8 IE9颜色:透明属性 [英] IE7 IE8 IE9 color:transparent property

查看:82
本文介绍了IE7 IE8 IE9颜色:透明属性的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我可能没有足够的信息来在这里提出一个完整的问题,但是如果有人有想法或需要更多信息在评论中提问,我将试一试,我将尝试获取尽可能多的信息.

I may not have enough information to generate a complete question here but I am going to give it a shot if anyone has ideas or needs more info ask in comments and i will try to get as much information as I can.

我正在处理一些我未编写的代码中的问题.该页面使用javascript日期选择器,并将该日期放入输入框.遍历代码并按f12键,将属性从

I am dealing with an issue in some code that I did not write. The page uses a javascript date picker and puts that date into an input box. Tracing through the code and hitting f12 I changed the property from

    style="color:transparent"

    style="color:black"

,我可以看到在输入字段中输入的日期.

and i am able to see the date that is entered into the input field.

不过,透明文本仅出现在IE9中,并在IE7和IE8中正确显示.因此,我有一个解决问题的方法,但我的问题是,是否有人在导致此问题之前遇到过此问题.如果要怪IE版本之间的差异,是否有一种方法可以使样式表在所有版本中正常工作,因为更改源代码充其量是危险的,所以我试图找到一种方法来对此进行更改,而无需更改页面.

The transparent text only occurs in IE9 though, and show correctly in IE7 and IE8. So I have a solution to the problem but my question is if anyone has run across this issue before what is causing this. If the differences between IE version are to blame is there a way with a stylesheet to make it work correctly across all versions, because changing the source code is dangerous at best I am trying to find a way to make changes to this wihout changing the page.

感谢您的任何评论或建议.

Thank You for any comments or suggestions.

推荐答案

原因是IE7和IE8显然不支持 color:transparent ,而IE9则支持.据我所知,IE9是运行正常的,而IE7和IE8是错误的,而不是相反.

The cause is that IE7 and IE8 apparently don't support color: transparent and IE9 does. As far as I can tell, IE9 is the one that is acting correctly and IE7 and IE8 are wrong, not the other way around.

对我来说,最佳"解决方案是更改源.我不太确定要如何不更改页面"来解决任何问题,而必须进行一些更改.

To me the "best" fix is to change the source. I'm not really sure how you want to fix anything "without changing the page", you have to change something.

如果您真的不会更改日期选择器的来源,则可以使用!important 作为最后的选择.

If you really won't change the source of the datepicker you could use !important as a last resort.

<some selector>{
    color: black !important;
}

这篇关于IE7 IE8 IE9颜色:透明属性的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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