var preloader = document.getElementById("loading"); var body = document.querySelector("body"); var html = document.querySelector("html"); document.addEventListener("DOMContentLoaded", function () { setTimeout(function loader() { preloader.style.display = "none"; body.classList.remove("no-scroll-y"); body.classList.add("no-scroll-x"); html.classList.add("no-scroll-x"); }, 1500); });
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter