javascript - parallax works as plain html but not as angular component html -
the following html code angular component - parallax.component.html. works plain html not in angular app on port 4200. in angular app, images 1 below other.
<div id="container" class="container"> <div id="scene" class="scene"> <div class="layer" data-depth="1.00"><img src="http://matthew.wagerfield.com/parallax/examples/images/layer1.png"></div> <div class="layer" data-depth-x="0.80" data-depth-y="-0.80"><img src="http://matthew.wagerfield.com/parallax/examples/images/layer2.png"></div> <div class="layer" data-depth-x="-0.60" data-depth-y="-0.20"><img src="http://matthew.wagerfield.com/parallax/examples/images/layer3.png"></div> <div class="layer" data-depth="0.40" data-depth-y="-0.30"><img src="http://matthew.wagerfield.com/parallax/examples/images/layer4.png"></div> <div class="layer" data-depth="0.20"><img src="http://matthew.wagerfield.com/parallax/examples/images/layer5.png"></div> <div class="layer" data-depth="0.00"><img src="http://matthew.wagerfield.com/parallax/examples/images/layer6.png"></div> </div> </div> <script src="https://drive.google.com/uc?export=download&id=0b1pn_esrbefuu3e2a1dpsxbkngm"></script> <script> // pretty simple huh? var scene = document.getelementbyid('scene'); var parallax = new parallax(scene); </script>
Comments
Post a Comment