N
N
Nikita Gusakov2013-12-05 14:05:03
css
Nikita Gusakov, 2013-12-05 14:05:03

How to make a gradual loading of a large image without js?

Please tell me, I have a large background image, about 1 mb.
The image is actually a large gradient + some graphics that cannot be selected and placed using css on the background of the gradient.
Now it's like this, but it doesn't work:

body {
        background-image: -webkit-linear-gradient(180deg, #a0cbdd, #31b1e6);
        filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#31b1e6', endColorstr='#a0cbdd',GradientType=1 );
        background-image: url(/images/snow-bg.png);
        background-size: cover;
    }

Answer the question

In order to leave comments, you need to log in

6 answer(s)
S
Sergey, 2013-12-05
Protko @Fesor

You can try using multiple background for this, although it's better to remake the background image itself.

D
Dmitry Guketlev, 2013-12-05
@Yavanosta

You set background-image twice, that's why it doesn't work

F
fixmax1, 2013-12-05
@fixmax1

As far as I could understand, you need 2 backgrounds ?!
If so, then just put another div in the body and set the background for the body - gradient, and for the div - "+ some graphics" (another, translucent image).

M
Mikhey Egorov, 2013-12-05
@TheLast

And in addition: use progressive png (unless of course you already use it).

M
Masterme, 2013-12-05
@Masterme

what doesn't work?

M
Masterme, 2013-12-05
@Masterme

You can make the style at the very end of the page, before </body>

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question