最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

javascript - disable scroll bar on the div - Stack Overflow

programmeradmin4浏览0评论

I have a div.

I want that user should not be able to scroll the page if the height is more than 350px. Also the scroll bar should be visible in disable mode in that case.

I want to achieve this using javascript.

Thanks

I have a div.

I want that user should not be able to scroll the page if the height is more than 350px. Also the scroll bar should be visible in disable mode in that case.

I want to achieve this using javascript.

Thanks

Share Improve this question asked Jun 10, 2009 at 8:46 ArunArun 2
  • Please revise your question. None of what you wrote makes sense.. to me at least :) – cllpse Commented Jun 10, 2009 at 8:53
  • "If the div is higher than 350px, disable scrolling for the whole page", is that what you're after? I don't think there is a "disable" mode for scrollbars. Either they're there, or they're not. – peirix Commented Jun 10, 2009 at 8:57
Add a ment  | 

2 Answers 2

Reset to default 4

I can't say I pletely understood what you want, but I think what you're looking for is CSS not javascript. Take a look at the overflow property.

Seems like you're looking for overflow: hidden; perhaps?

发布评论

评论列表(0)

  1. 暂无评论