javascript - How to prevent the page from jumping when the page scroll bar appears
迷茫
迷茫 2017-06-26 10:54:16
0
1
882

How to prevent the page from jumping when the page scroll bar appears

premise:

1. Need to be compatible with ie8
2. The height of the page depends on the content (that is, whether it is a fixed height)

Question:
Modern browser scroll bars default to the overflow:auto type, but now you need to define an element to the right
(.tips{

position: fixed;
right: 0;
top: 100px;
z-index: 10;    
height: 250px;
width: 300px;

}), when the content height is enough, the page will flicker, tips The right side of the element will be hidden by a width (the width of the scroll bar). Is there any way to solve this?

迷茫
迷茫

业精于勤,荒于嬉;行成于思,毁于随。

reply all(1)
三叔
overflow: visible;

Because users have different screen widths, if you can’t accept flickering, just add a style to make the scroll bar always display

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template