[英]How to disable or hide the scroll to top button programmatically with HTML/CSS/JS? (Samsung Internet Browser)
[英]How to disable page scroll in html/css/js?
我正在使用html/css/js制作網站,但由於我添加了一些效果,出現了滾動。 但我不希望用戶看到滾動條,甚至用鼠標中鍵滾動。 我能做些什么來解決這個問題?
您可以在 CSS 中使用
overflow:hidden
https://developer.mozilla.org/de/docs/Web/CSS/overflow
或者如果你想滾動但你可以隱藏它
/* Hide scrollbar for Chrome, Safari and Opera */
.example::-webkit-scrollbar {
display: none;
}
/* Hide scrollbar for IE, Edge and Firefox */
.example {
-ms-overflow-style: none; /* IE and Edge */
scrollbar-width: none; /* Firefox */
}
https://www.w3schools.com/howto/tryit.asp?filename=tryhow_css_hide_scrollbar_keep_func
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.