An example is provided today:
Div scroll bar:
Two methods:
I,
<Div style = "overflow: Scroll; width: 400px; Height: 400px;"> </div>
Remember to set up width and height.
The following scroll bar is available only when the limit is not exceeded, so it is not the best choice.
II,
<Div style = "overflow-Y: auto; overflow-X: auto; width: 400px; Height: 400px;"> </div>
Remember to set up width and height.
In this way, it is better to say that when the width and height do not exceed, it is just a line.
Iii. Description
You can directly specify the overflow attribute as auto for the DIV, but you must specify the height of the DIV, for example:
<Div style = "position: absolute; Height: 400px; overflow: Auto">
</Div>
If a horizontal scroll bar is to appear, overflow-X: Auto
Similarly, the vertical scroll bar is: overflow-Y: Auto
If the DIV is included in another object such as TD, the position can be set to relative: Position: relative.
Div: Add a scroll bar to the DIV to set the scroll bar of the DIV