知识要点:
$("#dh").offset().top;//元素相对于窗口的距离
$(window).scrollTop(); //监控窗口已滚动的距离;
$(document).height();//整个文档的高度
$(window).height();//浏览器窗口的高度
浏览器滚动时执行的函数:
$(window).scroll(function (event) {
$(".bottom").addClass("com") //com是调用动画的css
})
知识要点:
$("#dh").offset().top;//元素相对于窗口的距离
$(window).scrollTop(); //监控窗口已滚动的距离;
$(document).height();//整个文档的高度
$(window).height();//浏览器窗口的高度
浏览器滚动时执行的函数:
$(window).scroll(function (event) {
$(".bottom").addClass("com") //com是调用动画的css
})
本文标题:浏览器滑动到指定位置执行动画
本文链接:https://www.haomeiwen.com/subject/rtmajqtx.html
网友评论