Get started with prelodr CDN

MIT licensed

Prelod: Background-loading library for seamless web app page transitions.

Tags:
  • preloader
  • minimal
  • responsive
  • ui
  • material-design

Stable version

Copied!

How to start using prelodr CDN


<!DOCTYPE html>
<html>
<head>
    <title>Get started with prelodr CDN - cdnhub.io</title>
    <style>
        #preloader {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background-color: #f3f3f3;
            z-index: 9999;
        }
        #preloader-logo {
            width: 100px;
            height: 100px;
            margin: auto;
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
        }
    </style>
</head>
<body>
    <div id="preloader">
        <img id="preloader-logo" src="logo.png" alt="Logo">
    </div>
    <script src="https://cdn.cdnhub.io/prelodr/2.1.1/prelodr.min.js"></script>
    <script>
        document.addEventListener('DOMContentLoaded', function() {
            Prelodr.show({
                logo: '#preloader-logo',
                backgroundColor: '#f3f3f3',
                onComplete: function() {
                    document.getElementById('preloader').style.display = 'none';
                }
            });
        });
    </script>
</body>
</html>
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!

All versions