wagerfield/parallax

Nothing move on Y axis

nawakman opened this issue · 1 comments

First, this is my project, feel free to replace picture to test it

HTML:

<meta charset="utf-8">

<title>Terraria Parallax Background</title>

<!-- Behavioral Meta Data -->
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">

<!-- Styles -->
<link rel="stylesheet" type="text/css" href="./resources/scripts/styles.css"/>
<div id="container" class="wrapper">
	<div id="scene">
		<div data-depth="0.10" class="test_position"><img src="./resources/images/StartMenuBackground.jpg"></div>
		<div data-depth="0.50" class="test_position2"><img src="./resources/images/BasicFloor.png"></div>
	</div>
</div>


<!-- Scripts -->
<script src="./resources/scripts/parallax.min.js"></script>
<script>

// Pretty simple huh?
var scene = document.getElementById('scene');
var parallax = new Parallax(scene);

</script>

CSS:

body {
-webkit-touch-callout: none;
-webkit-user-select: none;
-khtml-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
overflow: visible;
margin: 0; /* important sinon c'est décalé /
padding: 0; /
important sinon c'est décalé */
}
.test_position{
position: absolute !important;
left:-10px !important;
}
.test_position2{
position: absolute !important;
left: -1000px !important;
}

The problem that when i move my cursor, everything move normally on the X axis but nothing move on the Y axis.
If I remove class="test_position" everything work but i don't understand because class="test_position2" is exactly the same thing exept some value and it works with it, so it maybe come from here.
Anyway i'm lost, please HELP !!!