setTimeout(function() { var imgDefer = document.querySelectorAll('footer[data-src], .home-specification-banner .dt-sc-grid-banner-section'); var style = "background-image: url({url})"; for (var i = 0; i < imgDefer.length; i++) { imgDefer[i].setAttribute('style', style.replace("{url}", imgDefer[i].getAttribute('data-src'))); } }, 4000);
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