主题滚动条?是否可以?
我想编辑网站中滚动条的样式,使其适合整体主题。 google 好像没有相关信息。我的意思是有,但它们也会更改浏览器的滚动条并且仅适用于 IE。我该怎么办呢?
I want to edit the style of the scrollbar in my site so it would fit the overall theme. There doesn't seem to have info in google. I mean there are but they also change the browser's scrollbar and only work with IE. How would I go about this?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
如果我没记错的话,滚动条的样式不是 HTML 或 CSS 标准的一部分(我上次检查过),尽管 Internet Explorer 确实通过自己的标准扩展(barstardization?)支持它。
我的意见 - 不要为滚动条的样式而烦恼。 1994年就是这样。从那时起我们就继续前进。您会发现 99 - 100% 的大多数主要/流行网站根本不这样做。人们普遍认为滚动条的样式是一件可怕的事情。
我更喜欢无样式的滚动条。操作系统和浏览器对于 99% 的用户来说已经足够好了。
别管它。
If I remember correctly, styling of a scroll bar is not part of the HTML or CSS standard (last time I checked), although Internet Explorer does support it through their own extension (barstardisation?) of the standards.
My opinion - don't bother with styling of the scroll-bars. It is so 1994. We have moved on since then. You will find that 99 - 100% of most major/popular websites simply don't do it. It is generally accepted that styling of scroll-bars is a horrible thing to do.
I prefer my scroll-bars unstyled. The operating system and browser does a good enough job for 99% of the users out there.
Leave it alone.
如果你真的想要一些自定义滚动条,那么你可以在 Javascript 和 CSS 中使用一些技巧 - 关于 CSS 技巧。
还有很多 jQuery 插件。我使用过的一个名为 Lazybars - 实现起来非常简单。
希望这有帮助
If you really want some custom scrollbars then there are some hacks you can use in Javascript and CSS - Nice article on CSS-tricks.
There are plenty of jQuery plugins out there too. One I have used is called Lazybars - really simple to implement.
Hope this helps