200字范文,内容丰富有趣,生活中的好帮手!
200字范文 > 实现页面弹框背景虚化效果

实现页面弹框背景虚化效果

时间:2021-03-27 15:53:18

相关推荐

实现页面弹框背景虚化效果

实现效果类似alert效果

<style type="text/css">

#mask {

background: #000;

opacity: 0.6;

position: fixed;

z-index: 9999;

top: 0;

left: 0;

}

</style>

<script type="text/javascript">

function test(){

mask();//弹框之前用div遮盖

crm2Win2 = window.$.dicWin({

drag :true,//能否拖动窗口

closable :false,

title : '超时校验',

width : '500px',

height : '300px',

url : ctx +'/common/autoLockValid.jsp?EMPACCT=${LOGON_EMPEE.EMPEE_ACCT}&LATNID=${LOGON_EMPEE.LATN_ID}&USERID=${LOGON_EMPEE.USER_ID}&jtCrmSSOLogoutPage=<%=request.getAttribute("jtCrmSSOLogoutPage")%>',

});

}

var mask = function() {

$('<div id="mask" style="width: ' + $(window).width() + 'px; '

+ 'height: ' + $(window).height() + 'px;"></div>').appendTo("body");

};

</script>

本内容不代表本网观点和政治立场,如有侵犯你的权益请联系我们处理。
网友评论
网友评论仅供其表达个人看法,并不表明网站立场。