主题滚动条?是否可以?

发布于 2024-09-08 13:52:51 字数 85 浏览 7 评论 0原文

我想编辑网站中滚动条的样式,使其适合整体主题。 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

征﹌骨岁月お 2024-09-15 13:52:51

如果我没记错的话,滚动条的样式不是 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.

行雁书 2024-09-15 13:52:51

如果你真的想要一些自定义滚动条,那么你可以在 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

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文