Browser Scrollbar shift

后端 未结 6 1890
南方客
南方客 2021-01-05 01:59

When you go to page on my website where there is extra content, the scrollbar appears on the right, but it has a notiable shift to the left for my content. You notice this b

6条回答
  •  情话喂你
    2021-01-05 02:45

    Well, it depends on the browser.

    body {
    
    overflow-y: scroll;
    overflow-x: scroll;
    overflow: -moz-scrollbars-vertical;
    
    }
    

    Should force the horizontal (overflow-x) and vertical scrollbars (overflow-y) to be displayed. Though I recall that Opera sometimes fails to respect the declaration, unless it's on an element within the (divs and the like).


    Edited with regard to @wsanville's, and @BHare's, comment.

提交回复
热议问题