From 65e37bc3e4de60144ee7571da70896a4fa092569 Mon Sep 17 00:00:00 2001 From: Ethan Roseman Date: Sat, 9 Jan 2021 12:58:20 +0900 Subject: [PATCH] Remove background scrolling --- bg.js | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/bg.js b/bg.js index 29ba4ca..5fb2fa7 100644 --- a/bg.js +++ b/bg.js @@ -8,14 +8,9 @@ bgImg.onload = function() var factor = (window.innerHeight/this.height); var style = document.createElement('style'); style.type = 'text/css'; - style.innerHTML = '@keyframes bg_anim {\ - from {background-position-x:0%;} \ - to {background-position-x:-' + (this.width*(factor)) + '%;} \ - }'; document.getElementsByTagName('head')[0].appendChild(style); var bodyStyle = document.getElementsByTagName("body")[0].style; - bodyStyle.animationDuration = (5000*(factor)) + "s" bodyStyle.backgroundImage = "url(" + imgSrc + ")"; bodyStyle.backgroundRepeat = "repeat-x"; bodyStyle.backgroundAttachment = "fixed"; @@ -24,4 +19,4 @@ bgImg.onload = function() bodyStyle.animationIterationCount = "infinite"; bodyStyle.animationTimingFunction = "linear"; } -bgImg.src = imgSrc; \ No newline at end of file +bgImg.src = imgSrc;