码迷,mamicode.com
首页 > Web开发 > 详细

CSS遮罩层,全兼容

时间:2015-06-16 18:30:42      阅读:153      评论: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
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!