背景透明 文字不透明的css3解决方法:

流浪是好人,好人,一定是好人



在IE中使用filter:alpha(opacity=xx);使其子元素的position:relative

代码
<style type="text/css"><!--
.body
{ background:#9F3;}
.container
{background:#000; width:293px; background:rgba(0,0,0,0.4); filter:alpha(opacity=40);-webkit-box-shadow:2px 2px 6px #ccc;-moz-box-shadow:2px 2px 6px #ccc;}
.container .sub_con
{ position:relative; color:#fff; width:100%;}
-->
</style>
<div class="body">
<div class="container">
<div class="sub_con">流浪是好人,好人,一定是好人</div>
</div>
<br /><br /><br />
</div>

 

参考:http://liumiao.me/html/wd/W3C/225.html

posted on 2010-08-31 13:40  星光~  阅读(2884)  评论(0编辑  收藏  举报