Search

12/04/2007

always show/hide scrollbar in IE/Firefox

Men are greedy. IE always 有 vertical scrollbar 不管 document 的 size 是否超過了 canvas,所以我們想要 hide unnecessary vertical scrollbar

html{overflow:auto}

Always Show Vertical Scrollbar in Firefox [firefox] [css] [web]
html {overflow: scroll;} works but it also gives you a horizontal scroll bar.
html {overflow-y: scroll;} will give you just a vertical scroll bar, if that's what you are going for.

'overflow-x' and 'overflow-y' in Mozilla! - Anne’s Weblog
html {overflow: scroll;} works but it also gives you a horizontal scroll bar.
:root{overflow-y: scroll;}

沒有留言: