Page 1 of 1

Layer Background size"Parallax"

Posted: Sun Oct 29, 2017 11:43 pm
by mexman
Hi Pablo:
I like the Parallax option, but I can see that the background image is resized to about 300% when using the option.
Independently of $PARALLAX_SPEED$ settings and of the real background picture size.
You can see the effect here: http://www.kunstistmagie.de/mainfolder/ ... lerie.html:
(the two black/white pictures on top..one in parllax and the second one is the original!
Regards
Michael

Re: Layer Background size"Parallax"

Posted: Mon Oct 30, 2017 6:46 am
by Pablo
This is normal behavior.
When using 'parallax', the background mode is set to 'cover', if the original size of the image was used then thee would be no margin for scrolling.
Note that all parallax scripts work like this.

Just open the page in the browser, launch the debugger (F12) and uncheck 'cover'. As you will see, it does not work then...

Re: Layer Background size"Parallax"

Posted: Tue Oct 31, 2017 2:16 am
by mexman
Sorry, Pablo....I dont understand that.
There is no horizontal scrolling at all.
There is no vertical scrolling >100% possible.
So why does the image increase vertical and horizontally by 300%?
Which size is covered by "cover"? Shouldn't that be the size of the layer?
If you check the index.html on http://www.kunstistmagie.de/, there the picture is not streched by300%, just by about 150% and I cannot understand, why that does not happen to the parallax background in http://www.kunstistmagie.de/mainfolder/ ... lerie.html
So how could I estimate the part of the image which will be visible in the parallax cutout in order to format the image right?

Hope I could make my problem understandable :-(
Regards
Michael

Re: Layer Background size"Parallax"

Posted: Tue Oct 31, 2017 7:13 am
by Pablo
If you check the index.html on http://www.kunstistmagie.de/, there the picture is not streched by300%, just by about 150% and I cannot understand, why that does not happen to the parallax background in http://www.kunstistmagie.de/mainfolder/ ... lerie.html
That is because this image has a different aspect ratio!

If you want to implement parallax then you will need to make sure the image has enough content to scroll vertically.
The height of your image is very small so it needs to be resized 300% to be able to fill the entire screen (vertically).

Re: Layer Background size"Parallax"

Posted: Tue Oct 31, 2017 2:19 pm
by mexman
Thanks, I understand. So the parallax option is not really helpfull for using it in a "small" layer but mainly for a full size background :-(
Regards
Michael

Re: Layer Background size"Parallax"

Posted: Tue Oct 31, 2017 7:27 pm
by Pablo
So the parallax option is not really helpfull for using it in a "small" layer but mainly for a full size background :-(
You can use the parallax on a small layer, but the image must be 'full screen' (or at least have a screen ratio) otherwise there is no margin for scrolling.

Re: Layer Background size"Parallax"

Posted: Wed Nov 01, 2017 1:45 am
by mexman
I thought I had understood....but seems I did not:
If the picture is 10% bigger than the layer, there would be more than enough margin for scrolling (depending on the $PARALLAX_SPEED$ setting) but I have never seen a 300% scaling NECESSARY for a margin which is generally just a few %.
Even tehre is no necessary horizontal scaling because nobody will scroll horizontally!
Regards
Michael

Re: Layer Background size"Parallax"

Posted: Wed Nov 01, 2017 7:02 am
by Pablo
If the picture is 10% bigger than the layer, there would be more than enough margin for scrolling (depending on the $PARALLAX_SPEED$ setting)
No, the background is fixed so it needs to be the full height of the viewport.

Please note that I did not invent this effect. This is just how it works.