我正在尝试使用CSS
创建自定义滚动条,它分别在Chrome中工作,但在Internet Explorer中,它失败了。这是我对Chrome和IE的CSS
CHROME
::-webkit-scrollbar {
width: 6px;
height: 10px;
}
::-webkit-scrollbar-button:start:decrement,
::-webkit-scrollbar-button:end:increment {
display: none;
}
::-webkit-scrollbar-track-piece {
background-color: white;
-webkit-border-radius: 6px;
}
::-webkit-scrollbar-thumb:vertical {
background: rgba(0,0,0,0.3) url(scrollbar_thumb_bg.png) no-repeat center;
}
::-webkit-scrollbar-thumb:horizontal {
background: rgba(0,0,0,0.3) url(scrollbar_thumb_bg.png) no-repeat center;
}
::-webkit-scrollbar-thumb:vertical:hover {
background: rgba(0,0,0,0.4) url(scrollbar_thumb_bg.png) no-repeat center;
}
IE
::-ms-scrollbar {
width: 1px;
height: 10px;
}
::-ms-scrollbar-button:start:decrement,
::-ms-scrollbar-button:end:increment {
display: none;
}
::-ms-scrollbar-track-piece {
background-color: white;
-ms-border-radius: 6px;
}
::-ms-scrollbar-thumb:vertical {
background: rgba(0,0,0,0.3) url(scrollbar_thumb_bg.png) no-repeat center;
}
::-ms-scrollbar-thumb:horizontal {
background: rgba(0,0,0,0.3) url(scrollbar_thumb_bg.png) no-repeat center;
}
::-ms-scrollbar-thumb:vertical:hover {
background: rgba(0,0,0,0.4) url(scrollbar_thumb_bg.png) no-repeat center;
}
我正在使用Internet Explorer 10。 以上代码无法在IE中运行。任何人都有任何想法吗?