自定义滚动条Internet Explorer问题 [英] Custom scroll bar Internet Explorer issue

查看:207
本文介绍了自定义滚动条Internet Explorer问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个自定义滚动条,由代码完成,如下所示

I have a custom scroll bar accomplished by the code as shown here:

::selection {
    background: #333;
    color: #FFF;
}
::-webkit-scrollbar {
    width: 9px;
}
::-webkit-scrollbar-track {
    background:#eee;
    border: thin solid lightgray;
    box-shadow: 0px 0px 3px rgba(0, 0, 0, 0.1) inset;
}
::-webkit-scrollbar-thumb {
    background:#999;
    border: thin solid gray;
}

它适用于Chrome,Firefox ...,但 Internet Explorer 它不工作
我应该添加什么?

It works fine on Chrome, Firefox... but Internet Explorer it does not work What should I add?

推荐答案

例如Chrome和Safari的webkit浏览器上的滚动条。 Internet Explorer仅支持有限数量的滚动条自定义。请参见 MSDN参考和此< a href =http://www.spectrum-research.com/V2/projects_scrollbar_generator.asp =nofollow> IE滚动条CSS生成器。

The CSS specified will only apply a custom scrollbar on a webkit browser such as Chrome and Safari. Internet Explorer only supports a limited amount of scrollbar customisation. See the MSDN reference and this IE scrollbar CSS generator.

此外,Firefox不支持自定义滚动条(错误报告),因此我不知道你的CSS如何在Firefox中工作 - 这不是我的。

Also, Firefox doesn't support custom scrollbars (bug report), so I'm not sure how your CSS is working in Firefox - it isn't for me.

如果你愿意,你可以使用基于JavaScript的 jScrollPane 在所有浏览器中实现自定义滚动条,但警告,许多人讨厌JavaScript滚动条的用户体验,自己包括。

If you want, you can use JavaScript-based jScrollPane to implement custom scrollbars in all browsers, but be warned, many people hate the user experience on JavaScript scrollbars, myself included.

这篇关于自定义滚动条Internet Explorer问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆