我想要一些帮助淡出顶部和底部的div滚动部分。在阅读了和Yoann的答案后,我让顶部的fade工作了,但我不知道如何处理底部的问题。
$(window).on('scroll', function () {
$('.section').each(function (index, item) {
$(item).children().each(function (indexChild, child) {
var st = $(window).scrollTop();
st = $(window
根据的说法,我应该能够做这样的事情:
<div style="position: fixed; bottom: 0px;">
This is a test
</div>
让它浮到屏幕的底部。
我试着在JSFiddle中输入这个片段,它的工作方式与我所期望的完全一样--文本浮到了底部。
接下来,我在JSFiddle中尝试了以下内容:
<div id="test">
<div style="position: fixed; bottom: 0px;">
This is a test