Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

弹窗暗层效果 #39

Open
lcgyh opened this issue Dec 13, 2017 · 1 comment
Open

弹窗暗层效果 #39

lcgyh opened this issue Dec 13, 2017 · 1 comment

Comments

@lcgyh
Copy link
Owner

lcgyh commented Dec 13, 2017

No description provided.

@lcgyh lcgyh added the 主题 label Dec 13, 2017
@lcgyh lcgyh removed the 主题 label Aug 29, 2018
@lcgyh lcgyh changed the title react-router 弹窗暗层效果 Aug 2, 2019
@lcgyh
Copy link
Owner Author

lcgyh commented Aug 2, 2019

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <title></title>
    <link rel="stylesheet" href="http://r01.uzaicdn.com/content/v1/styles/subject.css"> 
    <link rel="stylesheet" href="styles/lianxi.css">
    <script src="http://r01.uzaicdn.com/content/v1/scripts/core.js"></script>
    <script src="scripts/lianxi.js"></script>
    <!--[if lt IE 9]><script src="//r.uzaicdn.com/content/libs/html5shiv.js"></script><![endif]-->
    <!--[if IE 6]><script src="//r.uzaicdn.com/content/libs/dd_belatedpng_0.0.8a-min.js" type="text/javascript"></script><script>DD_belatedPNG.fix('.png');</script><![endif]-->
    <style type='text/css'>
        .fn-mask{width: 100%;height: 100%;background: #000;opacity: 0.5;position: fixed;left: 0;top: 0;transition:all 0.5s ease 0s;z-index: 998;}
        button{margin:0 auto;display: block;margin-top: 300px;background: pink;}
        .main{width: 100px;height: 100px;background: #fff;position: fixed;left: 50%;top: 50%;z-index: 1000;text-align: center;line-height: 100px;}
        .main i{color: red;font-size: 36px;position: absolute;top:-30px;right: 0;cursor: pointer;}
    </style>
</head>
<body>
    <div class="box">
        <button>活动细则</button>
        <div class="fn-mask hide"></div>
        <div class="main hide">
            你好,我是弹窗
            <i>x</i>
        </div>
    </div>
</body>
 <script>
    $(function(){
    $('button').on('click',function(){
        $('.fn-mask').removeClass('hide');
        $('.main').removeClass('hide');
    })
    $('.main i').on('click',function(){
        $('.fn-mask').addClass('hide');
        $('.main').addClass('hide');
    })
})
 </script>

</html>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant