- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
- <html xmlns="http://www.w3.org/1999/xhtml">
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
- <title>史上最精简,最强大的JS遮罩层效果,支持ie firefox jQuery遮罩层</title>
- <script type="text/javascript" src="../../homepage/js/jquery-1.4.2.js"></script>
- <script type="text/javascript">
- var clientH = null;
- var jq = jQuery.noConflict();
- var h=null;
- window.onload = function zhezhao(){
- clientH = document.documentElement.clientHeight;
- if(isSafari=navigator.userAgent.indexOf("Safari")>0){
- h = document.body;
- }else{
- h =document.documentElement;
- }
- }
- function showBg(elem){
- var w = (document.documentElement.clientWidth/2)-(jq("#"+ elem).width()/2);
- jq("#"+ elem).css("top",(h.scrollTop+ (clientH/2)-(jq("#"+ elem).height()/2))+"px");
- jq("#"+ elem).css("left",w+"px");
- jq("#fullbg").css("display","block");
- jq("#"+ elem).css("display",
jq兼容各个浏览器的遮罩层效果,有关闭按钮(非常强大的)
最新推荐文章于 2023-01-07 11:11:48 发布
![](https://img-home.csdnimg.cn/images/20240711042549.png)