我在我的网站上有一个视频标题,有一个向下滚动按钮,当它到达更接近其链接的锚点时,它的不透明度会从1逐渐淡出到0。淡入淡出的js本身运行良好,但有一些东西干扰了它。它有一个问题,当它移动到视频标题上时,它会消失,脚本如下:
$(document).scroll(function (e) {
// offsetTop will be computed based on the closest relatively positioned parent element
// since your anchor has none, his will return distance to