How do I hide the page scroll bar in css?

Asked

Viewed 34 times

0

iframe#frame-spec {
    width:400px;
    height:280px;
    border: none;
    overflow: hidden;
}
iframe#frame-spec::-webkit-scrollbar {
    display: none;
}

1 answer

1

This solution theoretically covers all modern browsers:

html {
    scrollbar-width: none; /* ParaFirefox */
    -ms-overflow-style: none; /* Para Internet Explorer e Edge */
}

html::-webkit-scrollbar {
    width: 0px; /* Para Chrome, Safari, e Opera */
}

html can be replaced by any element you want to hide in the scroll bar.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.