ytpm
ytpm

Reputation: 5150

Colors look different from device to simulator

I have this UIWebView that reads from an HTML file with this style:

<style type="text/css">
    body {
        padding: 0 10px 0 10px;
        background-image: linear-gradient(bottom, rgb(9,57,48) 0%, rgb(54,97,71) 0%, rgb(120,169,118) 80%);
        background-image: -o-linear-gradient(bottom, rgb(9,57,48) 0%, rgb(54,97,71) 0%, rgb(120,169,118) 80%);
        background-image: -moz-linear-gradient(bottom, rgb(9,57,48) 0%, rgb(54,97,71) 0%, rgb(120,169,118) 80%);
        background-image: -webkit-linear-gradient(bottom, rgb(9,57,48) 0%, rgb(54,97,71) 0%, rgb(120,169,118) 80%);
        background-image: -ms-linear-gradient(bottom, rgb(9,57,48) 0%, rgb(54,97,71) 0%, rgb(120,169,118) 80%);

        background-image: -webkit-gradient(
        linear,
        left bottom,
        left top,
        color-stop(0, rgb(9,57,48)),
        color-stop(0, rgb(54,97,71)),
        color-stop(0.8, rgb(120,169,118))
        );
    }
</style>

when i'm running it on the iPhone Simulator everything goes well and it looks like that:

simulator

the problem is when i'm running it on the device, it looks like that (check the buttom of the image):

device

How can make this blurry white end to disappear?

Upvotes: 0

Views: 331

Answers (1)

jrtc27
jrtc27

Reputation: 8526

Change your white color stop to be at 100% (1.0) for your gradients.

Upvotes: 1

Related Questions