css遮罩层

<div id="adbox" style="display:block;">
  <div class="indxe-mask"></div>
  <div class="index-ad-close"></div>
  <div class="index-ad">
    <a href="http://www.cashlai.com/double11.do" target="_blank"><img src="http://www.cashlai.com/activity/double11/images/index_pop.png" width="848" height="456"></a>
  </div>
</div>
<style type="text/css">
.indxe-mask
{width:100%;height:100%;background-color:#000;opacity:0.5;-webkit-opacity:0.5;filter:alpha(opacity=50);-moz-opacity:0.5;position:fixed;z-index:999;top:0;left:0;} .index-ad{width:599px;height:566px;position:absolute;top:20%;left:50%;margin-left:-300px;z-index:1000;} .index-ad a{display:block;width:100%;height:100%;} .index-ad-close{position:absolute;top:22%;left:50%;margin-left:300px;background:url(http://www.cashlai.com/static_content_30/img/zhongqiu_close.png) no-repeat;width:38px;height:38px;z-index:1001;cursor: pointer;}
</style>
-webkit-opacity:谷歌chrome透明度
filter:IE透明度
-moz-opacity:firefox透明度
0.5表示半透明,1表示不透明

.indxe-mask 遮罩层的样式


原文地址:https://www.cnblogs.com/yushouling/p/4941627.html