Layer Background size"Parallax"

Issues related to previewing and publishing your web site.
Post Reply
mexman
Posts: 495
Joined: Mon Feb 11, 2013 11:33 am
Location: Puebla/Mexico

Layer Background size"Parallax"

Post by mexman » Sun Oct 29, 2017 11:43 pm

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

User avatar
Pablo
Site Admin
Posts: 2636
Joined: Mon Feb 13, 2006 7:00 am
Location: Europe
Contact:

Re: Layer Background size"Parallax"

Post by Pablo » Mon Oct 30, 2017 6:46 am

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...

mexman
Posts: 495
Joined: Mon Feb 11, 2013 11:33 am
Location: Puebla/Mexico

Re: Layer Background size"Parallax"

Post by mexman » Tue Oct 31, 2017 2:16 am

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

User avatar
Pablo
Site Admin
Posts: 2636
Joined: Mon Feb 13, 2006 7:00 am
Location: Europe
Contact:

Re: Layer Background size"Parallax"

Post by Pablo » Tue Oct 31, 2017 7:13 am

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).

mexman
Posts: 495
Joined: Mon Feb 11, 2013 11:33 am
Location: Puebla/Mexico

Re: Layer Background size"Parallax"

Post by mexman » Tue Oct 31, 2017 2:19 pm

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

User avatar
Pablo
Site Admin
Posts: 2636
Joined: Mon Feb 13, 2006 7:00 am
Location: Europe
Contact:

Re: Layer Background size"Parallax"

Post by Pablo » Tue Oct 31, 2017 7:27 pm

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.

mexman
Posts: 495
Joined: Mon Feb 11, 2013 11:33 am
Location: Puebla/Mexico

Re: Layer Background size"Parallax"

Post by mexman » Wed Nov 01, 2017 1:45 am

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

User avatar
Pablo
Site Admin
Posts: 2636
Joined: Mon Feb 13, 2006 7:00 am
Location: Europe
Contact:

Re: Layer Background size"Parallax"

Post by Pablo » Wed Nov 01, 2017 7:02 am

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.

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest