我有下面的代码改变背景颜色
HTML
<div class="checker">
</div>
<div class="red boxes">
</div>
<div class="green boxes">
</div>
<div class="blue boxes">
</div>
CSS
.checker {
width: 100px;
height: 100px;
border: 1px solid black;
position: fixed;
top: 0;
}
.boxes {
margin-top: 300px;
width: 600px;
height: 600px;
}
.red {
background: red;
}
.green {
background: green;
}
.blue {
background: blue;
}
如何改变将类“.checker”的背景颜色改为“.boxes”背景颜色,当它们触摸底部边框时呃与滚动,使用jquery
例如:当.class红色到达class =“。red .checker”的底部边界时,类“.checker”的背景颜色应该更改为红。等我不明白如何做到这一点。请帮帮我。
三upvotes并没有任何JavScript一个已经试过吗? – j08691