频道栏目
首页 > 资讯 > HTML/CSS > 正文

HTML蒙板加载中效果...

17-08-17        来源:[db:作者]  
收藏   我要投稿

HTML蒙板加载中效果...

<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="GBK">
    <title>蒙板</title>
    <style>
        .container {
            width: 900px;
            margin: 50px auto;
            text-align: center;
        }


        #myModel {
            position: absolute;
            top: 0;
            left: 0;
            display: none;
            background-color: rgba(9, 9, 9, 0.63);
            width: 100%;
            height: 100%;
            z-index: 1000;
        }


        .model-content {
            width: 50%;
            text-align: center;
            background: #ffffff;
            border-radius: 6px;
            margin: 100px auto;
            line-height: 30px;
            z-index: 10001;
        }
    </style>
</head>
<body>
<div class="container">
    <button onclick="showModel()">显示蒙板</button>
    <div id="myModel" onclick="closeModel()">
        <div class="model-content">
            <p><img src=/uploadfile/2017/0817/20170817092123397.gif" alt=""></p>
            <p>
                <button id="closeModel" onclick="closeModel()">关闭蒙板</button>
            </p>
        </div>
    </div>
</div>
<script>
    function showModel() {
        document.getElementById('myModel').style.display = 'block';
    }
    function closeModel() {
        document.getElementById('myModel').style.display = 'none';
    }
</script>
</body>
</html>

 

相关TAG标签
上一篇:HttpResponse的一些理解
下一篇:CSS3视区相关单位VW,VH
相关文章
图文推荐

关于我们 | 联系我们 | 广告服务 | 投资合作 | 版权申明 | 在线帮助 | 网站地图 | 作品发布 | Vip技术培训 | 举报中心

版权所有: 红黑联盟--致力于做实用的IT技术学习网站