Hi, I was coding CSS, and then I meet the problem.
I had learned that if I code the CSS code bellow, the scroll bar will not display on the web page.
::-webkit-scrollbar { display: none; }
But I wanted to display the horizontal scroll bar and hide the vertical scroll bar.
- How can I hide the vertical scroll bar, I don't know if the CSS code had something like
::webkit-y-scrollbar
?
CodePudding user response:
It may be possible to use the CSS overflow property. The overflow property allows you to control the content area and without viewing the rest of your code, it may work in this scenario. Try something like so:
html {
overflow-x: scroll;
overflow-y: hidden;
}
Documentation: https://www.w3schools.com/css/css_overflow.asp