Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!DOCTYPE html>
- <html lang="en">
- <head>
- <meta charset="UTF-8">
- <title>Page Loader</title>
- <style type="text/css">
- .loader {
- position: fixed;
- top: 0;
- left: 0;
- width: 100%;
- height: 100%;
- background-color: #fff;
- display: flex;
- align-items: center;
- justify-content: center;
- z-index: 100;
- }
- .loader-inner {
- width: 50px;
- height: 50px;
- border-radius: 50%;
- border: 10px solid #f3f3f3;
- border-top: 10px solid #FF1493;
- animation: spin 1s linear infinite;
- }
- @keyframes spin {
- 0% { transform: rotate(0deg); }
- 100% { transform: rotate(360deg); }
- }
- .hidden {
- display: none;
- }
- </style>
- </head>
- <body>
- <div class="loader">
- <div class="loader-inner"></div>
- </div>
- <div class="container">
- <h1>Welcome!</h1>
- <p>This is the content of the page.</p>
- </div>
- <script>
- window.addEventListener('load', function() {
- document.querySelector('.loader').classList.add('hidden');
- });
- </script>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement