标签:style blog java color os width
<html> <head> <title></title> <style type="text/css"> #divshow { position: fixed; /*相对于浏览器窗口进行定位*/ left: 0px; top: 0px; width: 100%; height: 100%; opacity:0.6; /* 透明度*/ background:red; display:none; position:absolute; /*相对定位*/ z-index:999; } </style> <script type="text/javascript"> function myfunction() { document.getElementById("divshow").style.display = "block" } </script> </head> <body> <div style=" left:0px; top:0px; width:100%; height:100%;"> <input type="button" id="btn" value="你好!" onclick="myfunction()" /> </div> <div id="divshow"> <div style=" width:300px; height:200px; left:50%; top:50%; position:relative; background-color:Gray; margin-left:-150px; margin-top:-100px;" >你妹的</div> </div> </body> </html>
Html遮罩层的显示(主要在于样式设置),布布扣,bubuko.com
标签:style blog java color os width
原文地址:http://www.cnblogs.com/yingger/p/3857914.html