Hello
I have a block overflow: scroll;
And on the desktop you can see the scroll on the side, but on the phone it's not there, it's just an empty space. What to do?
thank
1 answer
On the phone, the scroll appears when scrolling. Also, the presence and type of scrolling depends on the OS and its settings. For example, on macOS, by default, the scroll is also not visible, but it can be configured. However, the absence of a visible scroll does not mean at all that the block cannot be scrolled.
If scrolling your design is a mandatory requirement, then it can be customized using JS-libraries, or CSS. Customization on CSS is supported so far only by browsers based on the webkit engine. Below is an example of customization:
::-webkit-scrollbar { width: 5px; } ::-webkit-scrollbar-thumb { background: #f2f3f7; border-radius: 2px; } ::-webkit-scrollbar-track-piece { background: #fff; }
For a solution on JS I advise you to read the article https://habrahabr.ru/company/2gis/blog/169359/
|