I have 2 Div filled with some text and a 3rd one in between, and I want, when the 3rd one goes above the 1st one, to progressively change the Div. I don't know if I'm explaining this correctly, here's some code to illustrate my
HTML
<div id="container">
<div id="panel">
<p>
Panel 1
</p>
</div>
<div id="scrollingdiv">
<p>Scrolling Div</p>
</div>
<div id="panel2">
<p>
Panel 2
</p>
</div>
</div>
CSS
#container{
position: relative;
width: 900px;
}
#panel, #panel2{
height: 600px;
background-attachment: fixed;
}
#panel{
background: url('http://www.drodd.com/images15/letter-b25.jpg') center 0 no-repeat fixed;
}
#panel2{
background: url('http://www.drodd.com/images15/letter-c25.jpg') center 0 no-repeat fixed;
}
#scrollingdiv{
background-color: white;
}
https://jsfiddle.net/m4um9ow4/
The scrolling div gives the impression to "change" the background image, but the text follows the scrolling progression, and I want the text to change only when the scrolling div reaches the text of the 1st Div. In other words I want the user to feel that the scrolling div does the changes behind it.
I'm sorry, I'm probably not being very clear.