css - 如何在侧导航栏中隐藏滚动条?
问题描述
我创建了侧面导航栏,我想在恢复浏览器的高度时,根本看不到滚动条。
这是我的 CSS 代码:
.sideNavBar-icon {
list-style-type: none;
margin: 0;
padding: 0;
width: 60px;
background-image: linear-gradient(to bottom, #6c299b 0, #5ba7b4 99%, #55d6be 10000%);
background-repeat: no-repeat;
position: fixed;
overflow: scroll;
overflow-x: hidden;
top:70px;
bottom: 0px;
z-index: 1;
}
解决方案
您可以使用此 css 属性::-webkit-scrollbar {
display:none;
}
到具体的班级。
推荐阅读
- javascript - Nuxt 抛出:没有“new”就无法调用类构造函数
- bash - 检查 curl 响应代码并从 bash 函数内部返回结果
- azure - 如何使用 cli 从 Azure 文件共享中删除文件夹
- javascript - 尽管可能有多个匹配项,但如何仅从映射的数据中动态渲染出一段内容?
- python - 将多行 txt 数据转换为 CSV
- reactjs - 为函数而不是组件反应延迟加载
- facebook - 当用户通过“应用程序和网站”设置从 Facebook 删除我的应用程序并尝试在我的应用程序中重新连接时会发生什么?
- sharepoint-online - 是否可以将值从属性传递到 SPFx 中的 CSS?
- powershell - PowerShell:带有字符串参数的 pwsh -Command/-File 包含要传递给以根路径为值的子进程的参数
- react-hook-form - react-hook-form:如何在 reactstrap CustomInput 中重置标签