CSS如何实现Div层背景半透明而内容不透明效果? CSS如何实现Div层背景半透明而内容不透明效果?例如CF查看战绩的那种透明效果 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 <html><head><title>兼容ie6,ie7以及firefox的css透明滤镜,文字不继承其透明属性</title><style type="text/css"> #container{ border:1px solid #c00; background-color:rgba(212,0,0,0.3); *background:#f00; filter:alpha(opacity=30); width:500px; margin:40px auto; line-height:200%; font-size:14px; p adding:14px; } #container *{ position:relative;}</style></head><body>本例是一个兼容IE6/IE7/IE8和火狐浏览器的css实现半透明层效果!<div id="container"> <span>我是内容我是内容我是内容我是内容我</span> </div></body></html> firefox 跟 IE下 效果不一样属性继承了,文字也变 透明了 楼主啊下面这个我测试过了,都OK的,给我分吧~~~<title>透明</title><head><style>#container { color: #154BA0; background: #ff0000; filter: Alpha(Opacity=10, Style=0); opacity: 0.10; position: absolute; height: 200px; width:500px; z-index:20;}#text { position: absolute; height: 200px; width:500px; text-align:center; z-index:30;}</style></head><body ><div id="container"></div><div id="text">背景半透明但文字不透明</div></body></html> [color=#FF0000]要么两个叠在一起的层要么用半透明的png(推荐)[/color] window.addEventListener这些资料从哪里查?是javascript的什么内容? 这个问题能用js实现吗?? 如何实现层拖动? 在js中如何过滤掉< 和>这两个字符? 如何动态显示条目的详细内容 请教如何让$.Dialog弹出后自动关闭 2个小问题:高手大侠都快来拿分啊! 怎样控制文本框中的只读属性 各位大哥帮帮忙!怎样做一个站内搜索! js不能删除cookie 如何用for来循环出多个相同的else if(){...}语句 如何获取网页中图片的句柄
<html>
<head>
<title>兼容ie6,ie7以及firefox的css透明滤镜,文字不继承其透明属性</title>
<style type="text/css">
#container{
border:1px solid #c00;
background-color:rgba(212,0,0,0.3);
*background:#f00;
filter:alpha(opacity=30);
width:500px; margin:40px auto;
line-height:200%;
font-size:14px; p
adding:14px;
} #container *{ position:relative;}</style>
</head>
<body>
本例是一个兼容IE6/IE7/IE8和火狐浏览器的css实现半透明层效果!
<div id="container">
<span>我是内容我是内容我是内容我是内容我</span>
</div>
</body>
</html>
firefox 跟 IE下 效果不一样属性继承了,文字也变 透明了
<head>
<style>
#container {
color: #154BA0;
background: #ff0000;
filter: Alpha(Opacity=10, Style=0);
opacity: 0.10;
position: absolute;
height: 200px;
width:500px;
z-index:20;
}#text {
position: absolute;
height: 200px;
width:500px;
text-align:center;
z-index:30;
}
</style>
</head>
<body >
<div id="container"></div>
<div id="text">背景半透明但文字不透明</div>
</body>
</html> [color=#FF0000]要么两个叠在一起的层
要么用半透明的png(推荐)[/color]