jparallax icon indicating copy to clipboard operation
jparallax copied to clipboard

Start at the center

Open ghost opened this issue 11 years ago • 11 comments

Hello, I have not found how to make the starting possition layers is centered and I can move a fair front / rear. The xorigin options and yorigin does not seem to have any effect. Thank you for your help.

ghost avatar Jul 05 '13 07:07 ghost

+1

zsitro avatar Jan 26 '14 17:01 zsitro

I'm having same issue. If I center the layers with negative margin-left and left:50% everything looks ok, but when I put the cursor inside viewport layers makes a fast move from center to left and center again. I mean, is like when I hover to viewport the parallas initializes from left and not from center.

chavocuervo avatar Jun 18 '14 16:06 chavocuervo

+1

nicothin avatar Jul 13 '14 23:07 nicothin

+1

alessandroalessio avatar Aug 05 '14 10:08 alessandroalessio

+1

sulram avatar Dec 04 '14 18:12 sulram

Solved. Look at #69

Grawl avatar Dec 25 '14 03:12 Grawl

i have problem ,,,

.parallax-viewport { height: 80%; margin: 30px 160px 0px 630px; position: absolute; text-align: center; /* width: 690px;*/ width:1000px;} .parallax-layer { position:absolute; text-align:center;} .parallax1 {width: 900px; height: 533px; display: block; margin-top: -610px; margin-left: -220px;} .parallax3 {width: 930px; height: 533px; display: block; margin-top: -610px; margin-left: -230px;} .parallax4 {width: 890px; height: 533px; display: block; margin-top: -610px; margin-left: -216px;} .parallax5 {width: 910px; height: 533px; display: block; margin-top: -610px; margin-left: -230px;} .parallax-layer.parallax1 > img { margin-left: -1100px; margin-top: -690px; width: 21%; } .parallax-layer.parallax3 > img { margin-left: -750px; margin-top: -715px; width: 21%;} .parallax-layer.parallax4 > img { margin-left: -456px; margin-top: -660px; width: 21%;} .parallax-layer.parallax5 > img { margin-left: -154px; margin-top: -690px; width: 21%;}

can`t be center... plz help

scorp559 avatar Dec 26 '14 09:12 scorp559

@scorp559 WUT

Grawl avatar Dec 26 '14 11:12 Grawl

.parallax-viewport { height: 80%; margin: 30px 160px 0px 630px; position: absolute; text-align: center; /* width: 690px;*/ width:1000px;}

scorp559 avatar Feb 11 '15 14:02 scorp559

I dunno what you are trying to achieve. It's your CSS problem I think.

Grawl avatar Feb 12 '15 01:02 Grawl

Well it's a combination of a few issues. Your CSS should have a graceful degradation to initialize at the proper position (if parallax itself never initializes), but also the parallax plugin needs to properly initialize it's own "idea" of where things are located as well (which it wasn't doing until my PR). Also, it doesn't register properly if your mouse is already over it. So, I think this may be an issue that is likely resolved by my PR here (i'm going through the old issues and seeing which may already be tackled by my PR's): https://github.com/stephband/jparallax/pull/89

I explained a bit further on another issue here: https://github.com/stephband/jparallax/issues/69#issuecomment-219164225

patricknelson avatar May 13 '16 21:05 patricknelson