知識(shí)要點(diǎn):
$("#dh").offset().top;//元素相對(duì)于窗口的距離
$(window).scrollTop(); //監(jiān)控窗口已滾動(dòng)的距離;
$(document).height();//整個(gè)文檔的高度
$(window).height();//瀏覽器窗口的高度
瀏覽器滾動(dòng)時(shí)執(zhí)行的函數(shù):
$(window).scroll(function (event) {
? ? ?$(".bottom").addClass("com")? //com是調(diào)用動(dòng)畫(huà)的css
})