HTMLify

Views: 89 | Author: djdj
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Uncloseable Pop-Up</title>
    <style>
        body {
            font-family: Arial, sans-serif;
            margin: 0;
            padding: 0;
            overflow: hidden;
        }

        .popup {
            display: none; 
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background-color: rgba(0, 0, 0, 0.5);
            z-index: 1000;
        }

        .popup-content {
            position: relative;
            margin: 10% auto;
            padding: 20px;
            width: 50%;
            background-color: white;
            border-radius: 10px;
            text-align: center;
        }

        .close-btn {
            position: absolute;
            top: 10px;
            right: 20px;
            font-size: 30px;
            cursor: pointer;
        }
    </style>
</head>
<body>
    <h1>Welcome in Menzii!!</h1>
    <div id="popup" class="popup">
        <div class="popup-content">
            <!--<span id="close-btn" class="close-btn">&times;</span>-->
            <h2>Important Notice</h2>
            <p>This is an important message. Please read it carefully. <a href="login.html">Login</a></p>
        </div>
    </div>
    <script>
        // pop-up show after 3 seconds 
        setTimeout(function() {
            document.getElementById('popup').style.display = 'block';
        }, 3000);

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

Comments