简体   繁体   English

如何水平滚动网页?

[英]How to Horizontally scroll a webpage?

I want to develop a webpage that moves towards the left direction whenever the user scrolls down the mousewheel. 每当用户向下滚动鼠标滚轮时,我想开发一个向左移动的网页。 Generally all websites are vertical scrolling. 通常所有网站都是垂直滚动。 But this one should scroll horizontally. 但是这个应该水平滚动。

Example code: 示例代码:

<body>
<div style="width:10000px; height:400px; top:0; left:0;">
//here goes the content.
</div>
</body>

My objective is to scroll the DIV horizontally on mouse-wheel scroll, using jQuery or any other Javascript tool. 我的目标是使用jQuery或任何其他Javascript工具在鼠标滚轮滚动上水平滚动DIV。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM