HTML实现遮罩层的方法 HTML中如何使用遮罩层
border: 1px solid rgba(0, 0, 0, 0.2); box-shadow: 0px 3px 9px rgba(0, 0, 0, 0.5); display: none; z-index: 10003; border-radius: 6px; }
index.js
JavaScript Code复制内容到剪贴板
function rightIFrameLoad(iframe) { var pHeight = getWindowInnerHeight() - $('#header').height() - 5;
$('div.body').height(pHeight); console.log(pHeight);
}
// 浏览器兼容 取得浏览器可视区高度 function getWindowInnerHeight() { var winHeight = window.innerHeight || (document.documentElement && document.documentElement.clientHeight) || (document.body && document.body.clientHeight); return winHeight;
}
// 浏览器兼容 取得浏览器可视区宽度 function getWindowInnerWidth() { var winWidth = window.innerWidth || (document.documentElement && document.documentElement.clientWidth) || (document.body && document.body.clientWidth); return winWidth;
}
/** * 显示遮罩层 */ function showOverlay() { // 遮罩层宽高分别为页面内容的宽高 (编辑:晋中站长网) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |