简易透明黑色背景

1.样式

.cover{
    height: 100%; width: 100%; position: fixed; bottom: 0px; left: 0px; top: 0px; z-index: 9998; background-color: rgb(0, 0, 0);

      filter:alpha(opacity=50);  

      -moz-opacity:0.5;  

      -khtml-opacity: 0.5; 

       opacity: 0.5;
}

2.js

$('.cover').show();

$('.cover').hide();

 

posted @ 2016-03-11 11:25  简单就好zyx  阅读(280)  评论(0编辑  收藏  举报