What is the difference between the scroll bar on the mobile side and the scroll bar on the PC side?

setting html {overflow: hidden} on mobile cannot hide the scroll bar. What is the principle?
there is also a scroll bar that floats and does not take up space. What"s the difference other than that?

added:
what I said about hiding invalid has been encountered before, and the CSS World P.167 of Zhang Xinxu"s predecessor also mentioned this point:

on the PC side, set the overflow: hidden hidden scroll bar on the < html > tag to disable scrolling, but it is basically invalid on the mobile side.

who says that setting html {overflow:hidden} on mobile cannot hide the scroll bar? you have to see that the scroll bar is caused by that element. Your body has a scroll bar, and it certainly doesn't work if you add an overflow:hidden to the html.


Mobile can use::-webkit-scrollbar to modify the style of the scroll bar, or you can hide the scroll bar

Menu