在Internet Explorer中调整滚动条的宽度 [英] resize scroll bar width in internet explorer

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

问题描述

我是Stackoverflow的新手.

I am new to stackoverflow.

我需要调整滚动条的宽度和高度.

I need to resize the scrollbar width and height.

我尝试了很多方法,但只能更改其颜色,而无法调整大小.

I tried in many ways, I can get only changing its color but not resizing.

推荐答案

尽管这是一个相当老的问题. MSIE具有一项功能,该功能允许滚动条在不使用时隐藏.这与引入的滚动条OSX Lion非常相似.纯CSS,没有JS.

Although this is a fairly old question. MSIE has a feature which allow the scrollbars to hide when not being used. This is very similiar to the scrollbars OSX lion introduced. Plain CSS , NO JS.

  body {

  scrollbar-base-color: #222;
  scrollbar-3dlight-color: #222;
  scrollbar-highlight-color: #222;
  scrollbar-track-color: #3e3e42;
  scrollbar-arrow-color: #111;
  scrollbar-shadow-color: #222;
  scrollbar-dark-shadow-color: #222; 
  -ms-overflow-style: -ms-autohiding-scrollbar;
}

上面的示例显示了将自定义滚动条添加到MSIE,然后在使用-ms-autohiding-scrollbar属性失去焦点时将其隐藏.

The example above shows adding custom scrollbars to MSIE and then having them hidden when out of focus with the -ms-autohiding-scrollbar property.

  • 注意-通过定位和#id或.class而不是正文,您可以对网站的不同部分使用不同的滚动条行为.

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

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