Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

侧边栏隐藏滚动条是如何实现的? #238

Open
webzhang0 opened this issue Apr 5, 2020 · 2 comments
Open

侧边栏隐藏滚动条是如何实现的? #238

webzhang0 opened this issue Apr 5, 2020 · 2 comments

Comments

@webzhang0
Copy link

.sidebar::-webkit-scrollbar {
width: 0;
}
只看到了这块代码,这个是不兼容IE的,但是这个项目的隐藏滚动条是兼容IE和火狐的。请问是怎么做的隐藏侧边栏滚动条呢?

@LR-alt
Copy link

LR-alt commented Apr 5, 2020 via email

@webzhang0
Copy link
Author

又研究了下代码,发现真正实现隐藏滚动条的是右侧content-box用了absolute定位,遮住了sidebar-el-menu的滚动条。
可以看下sidebar-el-menu的width,刚好和content-box的left相等。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants