颜色“透明”不工作 [英] Color "transparent" not working

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

问题描述

我有一个IE的问题(还有什么?):

I have a problem with the IE (what else?):

我用CSS生成内容也有一个背景图像。
我看起来像这样:

I generate content with CSS which has also a background-image. I looks like that:

#nav ul li:after {
    content: "--";
    position: relative;
    z-index: 99;
    background: transparent url(image.png);
    color: transparent;
}

文本颜色在非IE浏览器中是透明的,浏览器(IE6-IE8)它的黑色,你可以看到它。
我如何让文本透明/不可见?

The text color is in non-IE-browsers transparent, but in all IE browsers (IE6-IE8) it's black and you could see it. How could I make the text transparent/unvisible?

我试过了:visibility - opacity - filter - text-indent ...
但是

I tried already: visibility - opacity - filter - text-indent ... But none did his job right, either it disappears (with it background which I need) or the attribute doesn't apply.

推荐答案

没有他的工作权利,或者它消失了(我需要它的背景)我得到它:使用正确的填充和零字体大小!将padding-left值设置为超出图片宽度的一个像素。

I get it: With the correct padding and a zero font-size! Set the padding-left value to be one pixel beyond the image width.

这篇关于颜色“透明”不工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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