IE6问题 - border-color:transparent不工作 [英] IE6 Issue - border-color:transparent not working
问题描述
style =border:solid 1px transparent
在IE6中不工作,而是显示一个黑色边框。
style="border:solid 1px transparent"
is not working in IE6 instead it shows a black border.
如何解决这个问题?
推荐答案
IE6不支援a border
即 transparent
。
IE6 does not support a border
that is transparent
.
搜索,我找到了此解决方法:
With a quick search, I found this workaround:
http://acidmartin.wordpress.com/2008/08/24/emulating-border-color-transparent-in-internet-explorer-6/
到
让它与IE6一起工作,我们将
创建另一个规则,即可见
版本6(* html hack)
只有两行代码:
To put it to work with IE6, we will create another rule, that is visible only in version 6 (the *html hack) with just two lines of code:
*html .testDiv {
border-color: pink;
filter: chroma(color=pink);
}
...瞧!
在使用这个技巧之前,你应该在
中的最后一件事是
颜色(边框和色度颜色)
。确保你应用
边框颜色(并且分别在色度滤镜中使用
)在div中不使用
作为色度滤镜
显示某种颜色的对象
和它的内容作为透明,即
如果黑客中的边框颜色是
橙色,并且元素
中的文本也是橙色,当应用橙色色度滤镜是
时,会消失
。
The final things you should have in mind before using this trick is the color (both border and chroma color) in the hack. Make sure you apply a border-color (and respectively use it in the chroma filter) that is not used in that div, as the chroma filter displays a certain color of the object and its content as transparent, i.e. if the border-color in the hack is orange, and the text in your element is orange as well, it will disappear when the orange chroma filter is applied.
这篇关于IE6问题 - border-color:transparent不工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!