Browser Scrollbar shift

后端 未结 6 1877
南方客
南方客 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:35

    Give this a try... I know its ugly but it may be the only way.

    #force_scroll { 
        width: 1em; 
        position: absolute; 
        top: 0; 
        bottom: -0.1px; 
        z-index: -1; 
    }
    

    And then in your HTML somewhere (preferably right before your ):

提交回复
热议问题