禁用水平滚动 [英] DISABLE the Horizontal Scroll
问题描述
确定由于某种原因,我的网页从左到右滚动,并显示了很多丑陋的空间。
Ok for some reason my webpage scrolls from left to right and shows a lot of ugly space.
我搜索了结果,但他们刚刚创建了滚动条 HIDDEN
I have searched for results but they just made the scrollbar HIDDEN
现在我想要的,我想物理禁用水平滚动功能。我不想让用户能够在我的页面上左右滚动上下!
That's now what I want, I want to physically DISABLE the horizontal scroll feature. I do not want the user to be able to scroll left to right on my page just up and down!
我试过: overflow-x:hidden
code>标签,但它只使滚动条隐藏,并没有禁用滚动。
I have tried: overflow-x:hidden
in css on my html
tag but it only made the scrollbar hidden and did not disable the scroll.
请帮助我!
以下是此页面的链接: http://www.green-panda.com/usd309bands/ (断开的链接)
Here is a link to the page: http://www.green-panda.com/usd309bands/ (Broken link)
这可能会给你一个更好的我正在谈论的想法:
This might give you a better idea of what I am talking about:
这是第一页加载时:
这是我向右滚动后:
>
推荐答案
尝试将其添加到您的CSS
Try adding this to your CSS
html, body {
max-width: 100%;
overflow-x: hidden;
}
这篇关于禁用水平滚动的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!