码迷,mamicode.com
首页 > 其他好文 > 详细

弹窗功能

时间:2017-09-04 21:28:17      阅读:191      评论:0      收藏:0      [点我收藏+]

标签:play   body   display   width   rgb   char   back   absolute   set   

<!doctype html>
<html>

    <head>
        <meta charset="utf-8">
        <title>弹窗</title>
        <style>
        html,body{
            height: 100%;
        }
        *{
            margin: 0;
            padding: 0;
        }
        .a{
            height: 100%;
            width: 100%;
            background: rgba(0,0,0,0.5);
            position: absolute;
            top:0;
            left:0;
            display: none;
        }
        .alert{
            height: 400px;
            width: 400px;
            position: absolute;
            background: yellow;
            left: 50%;
            top: 50%;
            margin-top: -200px;
            margin-left: -200px;
            display: none;
        }
        body:hover .a{
            display: block;
        }
        body:hover .alert{
            display: block;
        }
        </style>

    </head>

    <body>
        <p>        
        111111
        <br> 11111
        <br> 11111
        <br> 11111
        <br> 11111
        <br> 11111
        <br> 11111
        <br> 11111
        <br> 11111
        <br> 11111
        </p>
        <div class="a"></div>
        
        <div class="alert"></div>


    </body>

</html>

 

弹窗功能

标签:play   body   display   width   rgb   char   back   absolute   set   

原文地址:http://www.cnblogs.com/lhl66/p/7475523.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!