首页 > Web开发 > 详细

CSS遮罩层,全兼容

时间:2015-06-16 18:28:44      阅读:266      评论:0      收藏:0      [点我收藏+]
<script type="text/javascript">
$(function(){
	$(‘#divLocker‘).css({
        "position": "absolute",
        "margin-left": 0,
        "margin-top": 0,
        "background": "rgba(0, 0, 0, 0.8)",
        "height": function(){ return $(document).height();},
        "width": function(){ return $(document).width();},
	"overflow": "hidden",
        "z-index": "999"
    });
});
</script>

<body>
<div id="divLocker" style="display: none;">我是内容</div>


内容部分需要屏幕居中显示
<div id="payInterface" style="margin: auto; position: absolute; left: 0; right: 0; top: 0; bottom: 0; text-align: center; width:<?=$w?>px; height: <?=round($w*0.9*357/420, 2)?>px;"><img src="http://www.cnblogs.com/images/pay.png"  width="90%" /></div>

  

CSS遮罩层,全兼容

原文:http://www.cnblogs.com/doseoer/p/4581360.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!