I have a popup that displays some results, and I want a scroll bar to be display since the results are being cutt off (and I don't want the popup to be too long).
相关问题
- Adding a timeout to a render function in ReactJS
-
Why does the box-shadow property not apply to a
- Add animation to jQuery function Interval
- jQuery hover to slide?
- Issue with star rating css
Css class to have a nice Div with scroll
If you want to add a scroll bar using jquery the following will work. If your div had a id of 'mydiv' you could us the following jquery id selector with css property:
You need to add
style="overflow-y:scroll;"
to the div tag. (This will force a scrollbar on the vertical).If you only want a scrollbar when needed, just do
overflow-y:auto;