你能帮帮我吗,如何使用 CSS 设计垂直滚动条...有什么方法可以使用 css 或 css3 自定义垂直滚动条设计...提前致谢..
最佳答案
看看this网站。它为基于 -webkit-
的浏览器使用自定义滚动条。当您检查 css 文件时,很清楚使用了什么 css。
@media only screen and (-webkit-min-device-pixel-ratio: 0) and (min-device-width: 1025px) {
html { overflow: hidden; }
body {
position: absolute;
bottom: 0;
left: 0;
right: 12px;
top: 0;
overflow-y: auto;
overflow-x: hidden;
}
::-webkit-scrollbar {
width: 6px;
height: 6px;
}
::-webkit-scrollbar-button:start:decrement,
::-webkit-scrollbar-button:end:increment {
display: block;
height: 10px;
}
::-webkit-scrollbar-button:vertical:increment {
background-color: #fff;
}
::-webkit-scrollbar-track-piece {
background-color: #eee;
-webkit-border-radius: 3px;
}
::-webkit-scrollbar-thumb:vertical {
height: 50px;
background-color: #ccc;
-webkit-border-radius: 3px;
}
::-webkit-scrollbar-thumb:horizontal {
width: 50px;
background-color: #ccc;
-webkit-border-radius: 3px;
}
然而,http://jscrollpane.kelvinluck.com/是迄今为止我遇到的跨浏览器滚动条定制器的最佳示例...
关于html - 如何设计垂直滚动条或自定义垂直滚动条设计?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14254920/