当我们继续滚动时,我们会在特定时间到达divOne
的末尾。那时我希望divTwo
为relative
(最初是fixed
)。这是我的代码。请帮忙
.divOne {
height: 800px;
width: 100%;
background-color: #000;
}
.divTwo {
height: 50px;
width: 100%;
position: fixed;
bottom: 0;
background-color: brown;
}
.divThree {
height: 100px;
width: 100%;
background-color: pink;
}

<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script>
<div class="divOne"></div>
<div class="divTwo"></div>
<div class="divThree"></div>
&#13;