Chrome Extension gradient background not working properly
up vote
0
down vote
favorite
I am working on a Google Chrome extension that replaces the new tab page. (Like a lot of other extensions) I have the background-image tag with a gradient as the style of the body tag on said new tab page. When it loads the new tab, I get the gradient split into about 30 sections vertically, each with their own gradient. It also happens in the below snippet, but not on GitHub Pages.
Any help is appreciated.
Screenshot of page
Code:
<body id="pagebody" style="background-image: linear-gradient(0deg, #39f, #ff0);">
stuff
</body>
<script>
rotC = 0;
setInterval(function() {rotC++; if (rotC == 360) {rotC = 0;} document.getElementById('pagebody').style.backgroundImage = `linear-gradient(${rotC}deg, #39f, #ff0)`; /*lblTime.innerHTML = document.getElementById('pagebody').style.backgroundImage;*/}, 50);
</script>
css google-chrome-extension
add a comment |
up vote
0
down vote
favorite
I am working on a Google Chrome extension that replaces the new tab page. (Like a lot of other extensions) I have the background-image tag with a gradient as the style of the body tag on said new tab page. When it loads the new tab, I get the gradient split into about 30 sections vertically, each with their own gradient. It also happens in the below snippet, but not on GitHub Pages.
Any help is appreciated.
Screenshot of page
Code:
<body id="pagebody" style="background-image: linear-gradient(0deg, #39f, #ff0);">
stuff
</body>
<script>
rotC = 0;
setInterval(function() {rotC++; if (rotC == 360) {rotC = 0;} document.getElementById('pagebody').style.backgroundImage = `linear-gradient(${rotC}deg, #39f, #ff0)`; /*lblTime.innerHTML = document.getElementById('pagebody').style.backgroundImage;*/}, 50);
</script>
css google-chrome-extension
add a comment |
up vote
0
down vote
favorite
up vote
0
down vote
favorite
I am working on a Google Chrome extension that replaces the new tab page. (Like a lot of other extensions) I have the background-image tag with a gradient as the style of the body tag on said new tab page. When it loads the new tab, I get the gradient split into about 30 sections vertically, each with their own gradient. It also happens in the below snippet, but not on GitHub Pages.
Any help is appreciated.
Screenshot of page
Code:
<body id="pagebody" style="background-image: linear-gradient(0deg, #39f, #ff0);">
stuff
</body>
<script>
rotC = 0;
setInterval(function() {rotC++; if (rotC == 360) {rotC = 0;} document.getElementById('pagebody').style.backgroundImage = `linear-gradient(${rotC}deg, #39f, #ff0)`; /*lblTime.innerHTML = document.getElementById('pagebody').style.backgroundImage;*/}, 50);
</script>
css google-chrome-extension
I am working on a Google Chrome extension that replaces the new tab page. (Like a lot of other extensions) I have the background-image tag with a gradient as the style of the body tag on said new tab page. When it loads the new tab, I get the gradient split into about 30 sections vertically, each with their own gradient. It also happens in the below snippet, but not on GitHub Pages.
Any help is appreciated.
Screenshot of page
Code:
<body id="pagebody" style="background-image: linear-gradient(0deg, #39f, #ff0);">
stuff
</body>
<script>
rotC = 0;
setInterval(function() {rotC++; if (rotC == 360) {rotC = 0;} document.getElementById('pagebody').style.backgroundImage = `linear-gradient(${rotC}deg, #39f, #ff0)`; /*lblTime.innerHTML = document.getElementById('pagebody').style.backgroundImage;*/}, 50);
</script>
<body id="pagebody" style="background-image: linear-gradient(0deg, #39f, #ff0);">
stuff
</body>
<script>
rotC = 0;
setInterval(function() {rotC++; if (rotC == 360) {rotC = 0;} document.getElementById('pagebody').style.backgroundImage = `linear-gradient(${rotC}deg, #39f, #ff0)`; /*lblTime.innerHTML = document.getElementById('pagebody').style.backgroundImage;*/}, 50);
</script>
<body id="pagebody" style="background-image: linear-gradient(0deg, #39f, #ff0);">
stuff
</body>
<script>
rotC = 0;
setInterval(function() {rotC++; if (rotC == 360) {rotC = 0;} document.getElementById('pagebody').style.backgroundImage = `linear-gradient(${rotC}deg, #39f, #ff0)`; /*lblTime.innerHTML = document.getElementById('pagebody').style.backgroundImage;*/}, 50);
</script>
css google-chrome-extension
css google-chrome-extension
asked Nov 9 at 3:44
TheProgrammedDev
13
13
add a comment |
add a comment |
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53219554%2fchrome-extension-gradient-background-not-working-properly%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown