DEV Community

Freddy Huaylla
Freddy Huaylla

Posted on

Answer: hide scrollbar but keep scroll functionality in react.js

This worked for me, i created an external CSS file just like plain HTML and CSS and then linked it to the react file. It's also cross platform.

.parentDiv{
    width: 100%;
    height: 100%;
    overflow: hidden;
    position: relative;
}
.childDiv{
    position: absolute;
    top: 0;
    left: 0;
    bottom: -20px;
    right: -20px; 
    overflow:

Top comments (0)