Well, I do not even know how to ask and name what this functionality is, something similar to the Airbnb site when the right side card reaches the top of the page it stays fixed by moving only the contents of the middle of the page.
How do you do something like this?
Until I found this answer @ 6153074 but this is disappearing in my case I can not give fadeIn
or fadeOut
I'm not getting it, look how it is.
.banner-full {
img {
width: 99vw !important;
height: 70vh !important;
}
.cardContact {
height: 500px;
background-color: red;
width: 400px;
position: sticky;
top: 900px; /* distancia que o elemento vai parar antes do topo */
}
}
<div class="banner-full">
<img src="https://picsum.photos/1585/552/?random"alt="">
<div class="row">
<div class="col m6" style="height: 3000px">
</div>
<div class="col m6">
<div class="cardContact">
</div>
</div>
</div>
</div>
Appearing this way in Chrome DevTools: