gogoWebsite

Table el-table scrollbar style modification in element-ui

Updated to 11 hours ago
  // Width of the scrollbar
  /deep/ .el-table__body-wrapper::-webkit-scrollbar {
    width: 6px; // Horizontal scrollbar
    height: 6px; // Vertical scroll bar compulsory
  }
  // Sliders for scroll bars
  /deep/ .el-table__body-wrapper::-webkit-scrollbar-thumb {
    background-color: #ddd;
    border-radius: 3px;
  }

If the scrollbar style is consistent throughout the page, directly changing the global scrollbar style can also have an effect

// width of the scrollbar
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
  background-color: #e4e4e4;
  background-color: #e4e4e4; border-radius: 6px;
}
// scrollbar-thumb
::-webkit-scrollbar-thumb {
  background-color: #a1a3a9;
  border-radius: 6px;
}

There is a compatibility issue with the scrollbar styles, the above styles work in webkit browsers.

==================

In-page scrollbar style beautification css3

.treeScrollbar::-webkit-scrollbar-track-piece {
  // The color of the scrollbar's notch, and you can also set the border attribute
  background-color: #f1f1f1;
}

.treeScrollbar::-webkit-scrollbar {
  // Width of the scrollbar
  width: 10px;
  height: 10px;
}

.treeScrollbar::-webkit-scrollbar-thumb {
  // Scrollbar settings
  background-color: #c1c1c1;
  background-clip: padding-box;
  min-height: 28px;
  border-radius: 8px;
}

.treeScrollbar::-webkit-scrollbar-thumb:hover {
  background-color: #a8a8a8; }
}