【问题标题】:How to make the white color transparent background?如何使白色透明背景?
【发布时间】:2014-05-08 17:41:24
【问题描述】:

我想让背景以白色透明,这样背景上的一半重叠图像应该与白色相匹配:

这是我的代码,但不适合我

background1 {
    opacity:0.8;
    filter:alpha(opacity=80);
}

【问题讨论】:

  • background1 我猜这应该是.background1#background1。这是一个开始。
  • 试试这个..background1{ background: rgba (255,255,255, 0.8);}
  • Mabye background-color: rgba(255, 255, 255, 0.5);
  • background1 是 id 还是类?相应地使用#.

标签: css


【解决方案1】:

试试这个

div{
  position:relative;
  display:inline-block
}
span{
   background: rgba(255,255,255,0.60);
   width:100%;
  position:absolute;
  bottom:5px;
  color:red;
  padding:5px
}

DEMO

【讨论】:

    【解决方案2】:

    使用它对我来说很好......

    background1 {
        background-color: rgba(0, 0, 0, 0);
        background-image: none, linear-gradient(to top, rgba(255, 255, 255, 0.75) 0px, rgba(255, 255, 255, 0.8) 10px, rgba(255, 255, 255, 0.86) 20px, rgba(255, 255, 255, 0.9) 30px, rgba(255, 255, 255, 0.94) 40px, rgba(255, 255, 255, 0.98) 50px, rgba(255, 255, 255, 0.99) 60px, #FFFFFF 70px);
        background-repeat: repeat;
    }
    

    【讨论】:

      猜你喜欢
      • 2013-04-03
      • 2014-08-21
      • 2015-06-22
      • 2018-03-25
      • 1970-01-01
      • 1970-01-01
      • 2019-01-24
      • 1970-01-01
      • 2013-05-02
      相关资源
      最近更新 更多