Parallax with two layers when rolling the mouse

0

I'm trying to make a parallax in two layers and I'm not getting it.

What I want to do is look like the site link . I want the background image and title to move down at the same time and at different speeds to give the impression that the image is further down and the title a bit further forward by scrolling the mouse down, and the effect reversed by scrolling the mouse up.

My problem is that I have no idea how to do it in CSS3.

I've tried several examples like the site: link but without the desired effect.

The HTML framework to receive parallax looks like this:

HTML:

<div class="row parallax">
  <div class="col">
    <h1 class="text-center">text here</h1>
  </div>
</div>

<!-- restante do post -->
<br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br>

And CSS:

.parallax{
   background:url('https://cdn.pixabay.com/photo/2017/12/23/22/12/orange-3036097_960_720.jpg');
   height:300px;
}
    
asked by anonymous 20.09.2018 / 14:04

0 answers