自定义滚动条使用css [英] customize scroll bar using css

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

问题描述

我已经完成了以下自定义滚动条

I have done the following to customize my scroll bar

::-webkit-scrollbar {
width: 4px;
}

::-webkit-scrollbar-track {
-webkit-box-shadow: inset 0 0 6px rgba(0,0,0,0.3); 
border-radius: 10px;
}

::-webkit-scrollbar-thumb {
border-radius: 10px;
-webkit-box-shadow: inset 0 0 6px rgba(0,0,0,0.5); 
}

问题是这只适用于chrome和safari。

the problem is that this works only on chrome and safari. Any idea how to modify it in order to work for IE, opera and Mozila?

推荐答案

我认为前缀 -webkit - 只考虑safari和chrome上的滚动条。您应该添加 -moz - -o - -ms - 来完成代码。希望我帮了忙。

I think the prefix -webkit- consider only scroll bars on safari and chrome. you should add -moz-, -o- and -ms- to complete the code. Hope i helped.

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

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