我正在尝试在firefox中设置滚动条的样式,以实现OS X Lion中滚动条的外观。 这是我的时尚代码:
scrollbarbutton {-moz-appearance: none !important}
scrollbar, scrollcorner { -moz-appearance: none !important;
background-color: transparent !important;
}
scrollbar[orient='vertical'] { border-left: 0; -moz-transform:translateX(10px)}
scrollbar[orient='horizontal'] { border-top: 0; }
thumb { -moz-appearance: none !important;
border-color: red !important;
background: transparent;
opacity: .5;
border-style: solid;
}
thumb:hover, thumb:active {opacity: 1}
thumb[orient='vertical'] {
-moz-border-image: url(http://i.imgur.com/mxzFF.png) 15 0 15 0 fill;
border-width: 8px 0 8px 0;
-moz-transform:translateX(-10px);
z-index: 10000
}
但是,z-index设置不执行任何操作,页面内容覆盖滚动条拇指。
答案 0 :(得分:0)
将您的上一个css块更改为:
thumb[orient='vertical'] {
-moz-border-image: url(http://i.imgur.com/mxzFF.png) 15 0 15 0 fill;
border-width: 8px 0 8px 0;
-moz-transform:translateX(-10px);
position: relative;
z-index: 10000;
}