zoukankan      html  css  js  c++  java
  • 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{ 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; 218px; height:70px; bottom:0; left:0;filter:alpha(opacity=70); background:#ff6699; }
     li .popLovers_info{position:absolute; 218px; height:70px; bottom:0; left:0; }
     li .popLovers_info div{padding-top:10px; padding-left:20px; color:#FFFFFF; 185px; }
     li .popLovers_info span{color:#f6437f}

  • 相关阅读:
    Opencv 中透视变换函数对IplImage图像变换时出现的问题?
    algorithm ch15 FastWay
    LeetCode 151 reverse word in a string
    LeetCode 10 Regular Expression Match
    LeetCode the longest palindrome substring
    MS笔试中的一个关于函数返回的“小”题
    js数组
    js数据强转
    css居中问题
    html table
  • 原文地址:https://www.cnblogs.com/icss/p/2104142.html
Copyright © 2011-2022 走看看