ulli鼠标滚轮水平滚动
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了ulli鼠标滚轮水平滚动相关的知识,希望对你有一定的参考价值。
参考技术A 打开电脑上的“控制面板”模块,再点击“硬件和声音”模块位置。再点击方框中“鼠标”选项位置,点击“滚轮”选项卡,设置方框中的选项,这样就可以设置鼠标水平滚动了。同样方法也可以取消鼠标水平滚动。 参考技术B 开门见山。ulli鼠标滚轮水平滚动。水平滚动就是横向滚动的意思. 当你页面内容横向溢出的时候,出现的滚动条。
水平鼠标滚轮滚动
/* Copyright 2008 Paul Bennett - http://paulicio.us * Scroller.js * Captures mouse wheel events and runs the ScrollSmoothly * function based on their output. * Aims to aid usability by allowing the user to scroll the * page horizontally smoothly using only their mousewheel. * Mousewheel event capture by Adomas PaltanaviÄius at http://adomas.org/ */ function handle(delta) { if (delta <0) ScrollSmoothly(10,10,'right'); else if (delta >0) ScrollSmoothly(10,10,'left'); else ; } function wheel(event){ var delta = 0; if (!event) event = window.event; if (event.wheelDelta) { delta = event.wheelDelta/120; if (window.opera) delta = -delta; } else if (event.detail) { delta = -event.detail/3; } if (delta) handle(delta); if (event.preventDefault) event.preventDefault(); event.returnValue = false; } var repeatCount = 0; function ScrollSmoothly(scrollPos,repeatTimes, direction) { if(repeatCount < repeatTimes) if(direction == 'right') window.scrollBy(20,0); else window.scrollBy(-20,0); else { repeatCount = 0; clearTimeout(cTimeout); return; } repeatCount++; cTimeout = setTimeout("ScrollSmoothly('" + scrollPos + "','"+ repeatTimes +"','"+ direction +"')",10); } /* Initialization code. */ if (window.addEventListener) window.addEventListener('DOMMouseScroll', wheel, false); window.onmousewheel = document.onmousewheel = wheel;
以上是关于ulli鼠标滚轮水平滚动的主要内容,如果未能解决你的问题,请参考以下文章