1. 程式人生 > >谷歌瀏覽器css設定滾動條

谷歌瀏覽器css設定滾動條

效果:

程式碼

/*滾動條樣式:谷歌瀏覽器下*/
::-webkit-scrollbar{
  width: 10px;
  height: 10px;
  background-color: #f5f7fa;
}
/*滾動條的軌道*/
::-webkit-scrollbar-track{
  /*box-shadow: inset 0 0 5px rgba(0,0,0,.3);*/
  background-color: #f5f7fa;

}
/*滾動條的滑塊按鈕*/
::-webkit-scrollbar-thumb{
  border-radius: 10px;
  background-color: #e4e7ed;
  /*box-shadow: inset 0 0 5px #000;*/
}
/*滾動條的上下兩端的按鈕*/
::-webkit-scrollbar-button{
  height: 0px;
  background-color: #B0AEDA;
}
.el_tableDiv{
  height: 420px;
  overflow-y:auto;
}
/**設定滾動條寬度 */
/*::-webkit-scrollbar{width:0px;height: 0px}*/