Is there a way to never ever have a scroll bar on

2019-06-28 00:39发布

I have a div that, depending on circumstances, can overflow. Is there a way so that, no matter how much data is in the div, it will not have a scroll bar? I was hoping that there would be a style I could just add like:

<div style="width:100; height:100; noscroll:true" >

Is there such a thing?

1条回答
趁早两清
2楼-- · 2019-06-28 01:01

Yes, you can use overflow: hidden; and it will never show a scroll bar. Note that this might also disable scrolling (even with mouse wheel) in some browsers.

You can specify overflow-x: hidden; for horizontal or overflow-y: hidden; for vertical scrollbars.

查看更多
登录 后发表回答