HTML 图片上增加一层 透明层 并写不透明文字以及元素透明效果

           <div style="position: relative; " class="demo-carousel"> <img style="width:100%;height:100%"src="../../static/img/bg_1_副本_副本.jpg" alt=""> 
              <span style="position: absolute; top: 0%; left: 0%;width:100%;height:100%">  
                        <span style=";width:100%;height:100%"class="ms"></span>
                        <div class="toumingzia">
                            <div style="float:left; width: 80%;">
                              <h2 style="float:left;font-size:25px;family='Microsoft YaHei';   font-style: italic;"id="scenic_title"><font  color="#FFFFFF">软件部-集成测试组</font></h2>
                            </div> 

                            <div style="float:left;background: ; width: 80%;">
                               <h2 style="text-align:left;margin-top:5%;float:left;"id="scenic_title"><font style="font-weight:800;font-size:59px;family='Microsoft YaHei' " color="#FFFFFF">我们满怀期望,永不止步的追求,蕾琪未来的脚步会更加铿锵有力!</font></h2>
                            </div>  
                            <div style="float:left;background: ; width: 60%;">
                               <h2 style="text-align:left;margin-top:1%;float:left;"id="scenic_title"><font style=" font-weight:100;font-size:20px;family='Microsoft YaHei' " color="#FFFFFF"> We have great hope that never stop the pursuit, the Lchear pace of the future will be even more sonorous and forceful.</font></h2>
                            </div> 
                        </div> 
              </span>
           </div>

<style>

.toumingzia{
    width: 60%; 
    margin-left:17%;
    position: absolute;
    top: 30%;
    background: ;
} 
</style>

元素透明度加上这句即可:
filter:alpha(Opacity=60);-moz-opacity:0.6;opacity: 0.6

  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值