This article introduces the sample code for configuring H5 scroll bar style and shares it with everyone. The details are as follows:
/* The background color of the scroll bar's slider */::-webkit-scrollbar-track { background-color: #b46868;}/* The color of the slider */::-webkit-scrollbar-thumb { background-color: rgba( 0, 0, 0, 0.2);} /* Color of the listening buttons at both ends of the slide rail*/::-webkit-scrollbar-button { background-color: #7c2929;}/* The color of the sharp corners at the intersection of the horizontal scroll bar and the vertical scroll bar*/::-webkit-scrollbar-corner { background-color: black;} // IE's own setting method, and the first one Browsers that can customize scroll bars are compatible with body { scrollbar-face-color: #b46868;} starting from IE5.5. Example /* Document scrollbar */::-webkit-scrollbar { width: 8px;}::-webkit-scrollbar-track { box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.3); border-radius: 10px;}::-webkit-scrollbar-thumb { border-radius : 10px; box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.5);}/* Scrollable element */.some-element::webkit-scrollbar {}<div class=custom-scrollbar> <p> Lorem ipsum dolor sit amet consectetur adipisicing elit. Iure id exercitationem nulla qui repellat laborum vitae, molestias tempora velit natus. Quas, assumenda nisi. Quisquam enim qui iure, consequatur velit sit? </p></div>The above is the entire content of this article. I hope it will be helpful to everyone’s study. I also hope everyone will support VeVb Wulin Network.