zoukankan      html  css  js  c++  java
  • 遮罩层

    遮罩层示例

                                                                这里是内容页面!

                                                                
     
    下面是本例的代码:
    <!DOCTYPE html>
    <html>
    <head>
        <title>遮罩层示例</title>
        <meta charset="utf-8" />
        <style type="text/css">
    
            .dialog-back{
                display: none;
                position:  absolute;
                top:0%;
                left:0%;
                width:100%;
                height:100%;
                -moz-opacity: 0.7;
                opacity:.70;
                filter: alpha(opacity=70);
                background-color:black;
                z-index: 1000;
            }
    
            .dialog-pop{
                display: none;
                position: absolute;
                top: 25%;
                left: 22%;
                width: 53%;
                height: 49%;
                padding: 8px;
                border: 8px solid #E8E9F7;
                background-color: black;
                z-index:1001;
                overflow: auto;
            }
    
        </style>
    </head>
    <body>
    <div class="main">
        <p>这里是内容页面!</p>
        <input type="button" value="弹出遮罩层" onclick="document.getElementById('back').style.display='block';document.getElementById('test').style.display='block';" />
        <input type="button" value="遮罩下点击" onclick="alert('如果你看到我,说明你的遮罩层有问题哦!')" />
    
    </div>
    <!--遮罩层-->
    <div class="dialog-back" id="back"></div>
    <!--位于遮罩层上的弹窗层-->
    <div class="dialog-pop" id="test">
        <input type="button" value="查看遮罩层" onclick="alert('这里是弹窗层');"/>
        <input type="button" value="隐藏遮罩层" onclick="document.getElementById('back').style.display='none';document.getElementById('test').style.display='none';" />
        <p>这里是弹窗层!</p>
    </div>
    </body>
    </html>
     
     

    这里是弹窗层!

  • 相关阅读:
    网络编程
    mysql
    python 基础
    vim 操作
    linux 基本命令
    基本库使用(urllib,requests)
    震撼功能:逐浪CMS全面支持PWA移动生成意指未来
    硬件能力与智能AI-Zoomla!逐浪CMS2 x3.9.2正式发布
    从送外卖到建站售主机还有共享自行车说起-2017年8月江西IDC排行榜与发展报告
    HTTP协议知多少-关于http1.x、http2、SPDY的相关知识
  • 原文地址:https://www.cnblogs.com/jameslong/p/4004021.html
Copyright © 2011-2022 走看看