The title pretty much sums it up. The first image below is a screenshot of a page that is about 8000 pixels tall, taken in the most recent version of Chrome:
On the other hand, this image depicts a different page (with the same CSS), which is only about 800 pixels tall:
And here is the accompanying code snippet:
body{
background-color: #f3ffff;
margin:0px;
background-image: url('/media/flourish.png'),
-webkit-linear-gradient(
top,
rgba(99, 173, 241, 1) 0px,
rgba(0, 255, 255, 0) 250px
);
background-image: url('/media/flourish.png'),
-moz-linear-gradient(
top,
rgba(99, 173, 241, 1) 0px,
rgba(0, 255, 255, 0) 250px
);
background-image: url('/media/flourish.png'),
-o-linear-gradient(
top,
rgba(99, 173, 241, 1) 0px,
rgba(0, 255, 255, 0) 250px
);
background-position: center top, center top;
background-repeat: no-repeat, repeat-x;
-ms-filter: "progid:DXImageTransform.Microsoft.gradient(GradientType=0, startColorstr='#63ADF1', endColorstr='#00000000')";
}
The gradient is supposed to stop at 250px from the top of the page. It's peculiar how the banding effect seems to be influenced by the overall height of the page: pages with heights between 800px and 8000px exhibit smaller bands compared to the first example but still visible.
Interestingly, I used to utilize -webkit-gradient('linear'...)
before, and it didn't have the same issue. I switched to -webkit-linear-gradient
to align with my -moz
and -o
gradients.
I haven't tested this on Safari yet, but the provided code works well on Firefox and somewhat on Opera (colors are off, but the gradient remains smooth). As for IE, I've given up hope.
Has anyone encountered a similar problem?
Update: This also occurs on my Mac's Chrome/Safari, albeit the bands are approximately one-third the size shown in the uppermost image for the exact same page. The banding looks identical on both OSX Chrome and OSX Safari.
Although one-third the size is noticeable, it's not as jarring. The actual page can be found at if you wish to see it in a different browser. The CSS is inline and compiled using less.js in-browser.