[英]jQuery Fade Out on Scroll not working
I am using this to fade out a div on scroll but its not working, 600 is the offset of the div. 我正在使用它淡出滚动上的div,但它不起作用,600是div的偏移量。 I cant figure out why this is not working.
我不知道为什么这不起作用。
$(window).scroll(function(){
wScroll = $(this).scrollTop();
$('.hack').css({
'transform' : 'translate(0px , ' + wScroll/2 +'%)',
'opactiy' : 1 - (wScroll/600)
});
});
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.