0

I'm working in a parallax with Polymer. I read the documentation in the official web site, and put this on my project. But doesnt works. This is my code:

<dom-module id="ingeview-home">
  <template>
    <style>
      :host {
        display: block;
        color: var(--text-color-dark);
        padding: 20px 10%;
      }

      parallax-element {
        height: 100vh;
      }
      parallax-element > * {
        min-height: 500px;
      }
      parallax-layers {
        min-height: 500px;
      }
    </style>

    <h1>HOME</h1>

    <parallax-element>
      <parallax-layers>
        <div depth="0">
          <image src=../images/pincel.png></image>
        <div>
      </parallax-layers>
      <parallax-layers style="z-index: -1;">
        <div depth="-0.5">
         <image src=../images/raya.png></image>
        <div>
        <div>
         <image src=../images/pincel.png></image>
        <div>
      </parallax-layers>
      <parallax-layers style="z-index: 1;">
        <div depth="0.2">
         <image src=../images/raya.png></image>
        <div>
      </parallax-layers>
    </parallax-element>
  </template>

  <script>

    class IngeViewHome extends Polymer.Element {
      static get is() { return 'ingeview-home'; }
    }

    window.customElements.define(IngeViewHome.is, IngeViewHome);
  </script>
</dom-module>

I'm search by a few hours, but cant find why dont appear anything

If you can explain how it works, I'll be grateful

Orlando
  • 467
  • 1
  • 7
  • 11
  • I'm experiencing the same issue. Perhaps you could post the issue on the author's GitHub https://www.webcomponents.org/element/vguillou/parallax-element – Bryce W Jul 08 '17 at 22:46

2 Answers2

1

I have found a couple of the existing Polymer parallax web components are incompatible with Polymer 2.0, so I decided to implement it myself. I found this tutorial to be a good place to good start: https://www.w3schools.com/howto/howto_css_parallax.asp

Hopefully it helps you.

VIN
  • 6,385
  • 7
  • 38
  • 77
1

I created a new parallax web component for Polymer 2.0 and published it yesterday: https://www.webcomponents.org/element/watsonlogic-software/watsonlogic-parallax

Please feel free to contribute or let me know if there are any issues (it is my first component).

VIN
  • 6,385
  • 7
  • 38
  • 77