如何禁用HTML页面上的滚动条 [英] How to disable scrollbars on html page

查看:769
本文介绍了如何禁用HTML页面上的滚动条的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何不允许用户使用javascript/jquery滚动较长的html页面?
出现滚动条时如何冻结滚动?

:-D

how to not allow the user to scroll long html page using javascript/jquery?
how to freeze scrolling when scrollbars are present?

:-D

推荐答案


("body").css("overflow","hidden");

似乎不起作用
("body").css("overflow", "hidden");

seems doesn''t work


尝试一下.
只需将其添加到您的html文档的主体标签中,
滚动=否.

Try this.
Just add this to the body tag of your html doc,
scroll=no.

<head></head>
    <body scroll="no" ></body>
</html>


这篇关于如何禁用HTML页面上的滚动条的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆