How to create a simple Pop-up-box using HTML and CSS .(No javaScript or jQuery plugins are used).

 POP-UP-BOX CREATION 



                                                                                 Hey guy's this tutorial is based on How to create simple pop-up-box using only HTML and CSS . No JavaScript code is used here. Pop-up-box will occur every time when you visit my blog . It will also occur when you refresh the web page. So we hope you will like our this concept of designing pop-up-box .




Programming code :)




<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Pop-up box creation</title>
    <link rel="stylesheet" type="text/css" href="https://stackpath.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css">
    <style>
        *{
            margin0;
            padding0;
            box-sizingborder-box;
        }
        html{
            font-size62.5%;
        }
        :root{
            --w : #fff;
        }
        body{
            background-imagelinear-gradient(rgba(0,0,0,0.4),
rgba(0,0,0,0.4)),url(../Images/Nature.jpeg);
            background-sizecover;
            background-positioncenter;
            height100vh;
        }
        h1{
            font-size5rem;
            colorvar(--w);
            font-family'Trebuchet MS''Lucida Sans Unicode''Lucida Grande'
'Lucida Sans'Arialsans-serif;
            font-weightbold;
            letter-spacing.2rem;
            text-aligncenter;
            padding2rem 0rem;
        }
        #popup{
            width40rem;
            heightauto;
            background-color:red;
            color:var(--w);
            positionabsolute;
            top:50%;
            left50%;
            transformtranslate(-50%,-50%);
            padding-bottom3rem;
            border-radius3rem;
            displaynone;
            transitionall 1s ease;
            box-shadow0.5rem 0.5rem 2rem 0.3rem yellow,
-0.5rem -0.5rem 2rem 0.3rem yellow;
        }
        #popup h2{
            font-size3rem;
            text-aligncenter;
            padding5rem 0rem 3rem 0rem;
        }
        #popup h3{
            font-size2rem;
            text-aligncenter;
            padding3rem 0rem 5rem 0rem;
        }
        #popup label i{
            positionabsolute;
            right0;
            padding1rem;
            background-colorblue;
            font-size:2rem;
            text-aligncenter;
            cursorpointer;
        }
        #popup #a{
            background-colorgreen;
            text-decorationnone;
            text-aligncenter;
            padding:1rem 2rem;
            colorvar(--w);
            border.2rem solid var(--w);
            font-size2rem;
            font-weightbold;
            font-family'Segoe UI'Tahoma, Geneva, Verdanasans-serif;
        }
        #popup #a:hover{
            background-colorvar(--w);
            colorgreen;
            border.2rem solid green;
        }
        input[type="checkbox"]{
            displaynone;
        }
    </style>
</head>
    <body>
        <h1>WEB-DEVELOPMENT</h1>
        <input type="checkbox" id="c">
        <div id="popup">
            <label for="c" id="l" title="Close"><i class="fa fa-times"></i></label>
            <h2>Welcome to <br/>WEB-DEVELOPMENT!</h2>
            <h3>Subscribe Our Blog for New Updates!</h3>
            <center><a href="#" id="a" title="Subscribe us">SUBSCRIBE</a></center>
        </div>
        <script>
            setTimeout(function(){
                document.getElementById('popup').style.display = "block";
        } ,5000);

        document.getElementById('l').addEventListener("click",function(){
                document.getElementById('popup').style.display = "none";
            })
        </script>
    </body>
</html>




OUTPUT :)








( NOTE : - While executing program you have to replace links of images , audio's  or video's in this program by your links. So take care of it ! )