css 背景色透明文字不透明
需要整这么一个透明层,里面的文字不透明,但是css做不到,可以用下方法解决,(用两个div一个是背景层 一个是文字层,用定位搞定)
<li class="fl">
<img src="Public/Images/pic/pl4.jpg" width="218" height="330" />
<div class="popLovers_info_bg">
</div>
<div class="popLovers_info">
<div>
<p>姓名:张小薇<span class="pink f14 fw">19</span>岁</p>
<p>单位:北京市海淀区中关村大厦</p>
</div>
</div>
</li>
css:
li{ width:218px; margin-left:23px; position:relative; vertical-align:middle; height:330px; display:inline;}
li .popLovers_info_bg{ position:absolute; background:rgba(255, 102, 153, 0.7) none repeat scroll 0 0 !important; width:218px; height:70px; bottom:0; left:0;filter:alpha(opacity=70); background:#ff6699; }
li .popLovers_info{position:absolute; width:218px; height:70px; bottom:0; left:0; }
li .popLovers_info div{padding-top:10px; padding-left:20px; color:#FFFFFF; width:185px; }
li .popLovers_info span{color:#f6437f}