衆所周知,Windows 下渲染的原生滾動條並不是那麼好看。
既然我們知道 CSS 相當於化妝品,那麼我們怎麼通過 CSS 讓滾動條小姐姐變個妝呢?
Windows 7
下的默認滾動條樣式
talk is cheap, show me the code.
::-webkit-scrollbar{
width:8px;
height:8px;
}
::-webkit-scrollbar-track{
background: #f6f6f6;
border-radius:2px;
}
::-webkit-scrollbar-thumb{
background: #cdcdcd;
border-radius:2px;
}
::-webkit-scrollbar-thumb:hover{
background: #747474;
}
::-webkit-scrollbar-corner {
background: #f6f6f6;
}
效果圖
細心的同學也可以發現CSDN
的Markdown編輯器
也是改變了滾動條樣式的:
好了,今日份成長快樂(水貼)完畢!!!