如何调整/更改滚动条宽度 [英] How to Adjust/Change Scrollbar Width

查看:352
本文介绍了如何调整/更改滚动条宽度的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在测试某些布局代码时,有没有办法在FF或IE中临时更改滚动条宽度

我记得有一段时间读了这个与解决方法有关的东西,但是不太清楚。我试图改变电脑本身的分辨率,尝试增加浏览器的字体大小,但都没有工作。

更新
我碰到过 描述了如何从Firefox内部编辑设置,但是不能顺利运行,至少对我来说工作还不顺利。提问者说,它最终为他工作,所以我稍后会做更多的测试。

  ::  -  webkit-scrollbar {
width:6px;
background-color:rgba(0,0,0,0);
-webkit-border-radius:80px;

:: webkit-scrollbar:hover {
background-color:rgba(0,0,0,0.09);
}

:: - webkit-scrollbar-thumb:vertical {
background:rgba(0,0,0,0.61);
-webkit-border-radius:80px;
}
:: webkit-scrollbar-thumb:vertical:active {
background:rgba(0,0,0,0.61);
-webkit-border-radius:80px;
}

/ *试试这个* /


Is there a way to temporarily change the scrollbar width in FF or IE while I'm testing some layout code?

I remember reading something a while back about this being related to resolution, but can't quite remember. I tried changing the resolution of the computer itself, tried increasing browser font size, but both didn't work.

Update I've come across this thread that describes how to edit the settings from within Firefox, but it doesn't work smoothly, at least hasn't worked smoothly yet for me. The asker said it eventually worked for him, so I'll do more testing later.

解决方案

::-webkit-scrollbar {
  width: 6px; 
   background-color: rgba(0,0,0,0);
  -webkit-border-radius: 80px;
}
::-webkit-scrollbar:hover {
  background-color: rgba(0, 0, 0, 0.09);
}

::-webkit-scrollbar-thumb:vertical {
  background: rgba(0,0,0,0.61);
  -webkit-border-radius: 80px;
}
::-webkit-scrollbar-thumb:vertical:active {
  background: rgba(0,0,0,0.61);
  -webkit-border-radius: 80px;
}

/*Try this*/

这篇关于如何调整/更改滚动条宽度的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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