css3里面有个opacity,为了兼容ie可能需要添加 filter:alpha(opacity:70)之类的。
使用CSS的Chroma滤镜可以把字体颜色设置为透明样式。
<style type="text/css">
<!--
body{background-color:#999999}
/*滤镜中设置的颜色要和字体的颜色相同*/
#tm{color:#FF0000filter:chroma(color=#FF0000)
}
-->
</style>
将Chroma滤镜的颜色和字体的颜色设置为相同时,不论网页的背景颜色如何设置,字体的颜色都会显示为透明。
在浏览器中查看使用CSS滤镜把字体的颜色设置为透明的显示效果。如下图所示: