用h5+css3+js怎樣實現(xiàn)手機屏幕下拉刷新
慕粉2244456372
2016-10-17 20:10:48
TA貢獻59條經(jīng)驗 獲得超36個贊
獲取滾動條位置:document.documentElement.scrollTop;
當值為負,整個body的margin-top++。
margin-top如果超過0,且觸發(fā)mouseout(),刷新頁面。
滾動條為副值,主動回彈效果。也就是margin-top減少為0;
大概就是這么個思路吧。
舉報