Css: modifies the default style of a scroll bar.
Previously, due to Company project requirements, I found the following on the Internet:
Code directly
Html code
<Div class = "inner"> <div class = "innerbox"> <p style = "height: 200px; "> This is the content 111 </p> <p style =" height: 400px; "> content 222 </p> <p> content 333 </p> </div>
Css code
. Inner {width: 265px; height: 400px; position: absolute; top: 33px; left: 13px;/* cursor: pointer; */overflow: hidden ;}. innerbox {overflow-x: hidden; overflow-y: auto; color: #000; font-size :. 7rem; font-family: "\ 5FAE \ 8F6F \ 96C5 \ 9ED1", Helvetica, "", Arial, Tahoma; height: 100%;}/* scroll bar style */. innerbox:-webkit-scrollbar {/* overall scroll bar style */width: 4px;/* height and width correspond to the size of the horizontal and vertical scroll bars */height: 4px ;}. innerbox:-webkit-scrollbar-thumb {/* small box in the scroll bar */border-radius: 5px;-webkit-box-shadow: inset 0 0 5px rgba (0, 0, 0, 0.2); background: rgba (0.2, 0 );}. innerbox:-webkit-scrollbar-track {/* track in the scroll bar */-webkit-box-shadow: inset 0 0 5px rgba (0, 0, 0, 0.2 ); border-radius: 0; background: rgba (0.1, 0 );}