0
我遇到问题。我需要制作像这样的视差http://community.saucony.com/kinvara3/。我知道如何制作视差,但不能从鼠标移动滚动条。如何用滚动鼠标一次移动滚动视差
从滚动和滚动的一个运动直行。
我遇到问题。我需要制作像这样的视差http://community.saucony.com/kinvara3/。我知道如何制作视差,但不能从鼠标移动滚动条。如何用滚动鼠标一次移动滚动视差
从滚动和滚动的一个运动直行。
当触发滚动时,应该禁用临时滚动。
function disable_scroll() {
if (window.addEventListener) {
window.addEventListener('DOMMouseScroll', wheel, false);
}
window.onmousewheel = document.onmousewheel = wheel;
document.onkeydown = keydown;
}
function enable_scroll() {
if (window.removeEventListener) {
window.removeEventListener('DOMMouseScroll', wheel, false);
}
window.onmousewheel = document.onmousewheel = document.onkeydown = null;
}
嗯,但我接下来做什么?我想用MouseWheel(jQuery),但不成功:( – skozz
duplic? http://stackoverflow.com/questions/12461710/jquery-parallax-scrolling-effect-multi-directional –