Modify the style of the pagination component el-pagination in elementui

In my work, I used the paging component el-pagination in the elementui component library, but the component has a white background color by default, which looks very awkward on a page with a background. Although I have been modifying it in my previous work, it is still for convenience. Directly from Baidu, I tried about seven or eight CSS code snippets, but none of them worked or had any effect, so I decided to write it myself and opened the check element... as follows, use it
directly

// page-sizes选择器
::v-deep .el-select-dropdown__item li{
    
    
  background-color:transparent !important;
}
// prev和next箭头的样式
::v-deep .el-pagination .btn-next,
::v-deep .el-pagination .btn-prev{
    
    
  background:transparent !important;
  background-color:transparent !important;
}
// prev和next箭头disabled的样式
::v-deep .el-pagination button:disabled {
    
    
  background-color:transparent !important;
}
// 页码样式
::v-deep .el-pager li{
    
    
  background-color:transparent !important;
}
// active的页码样式
::v-deep .el-pager li.active{
    
    
  color: #267aff !important;
}

Effect:
Insert image description here

Guess you like

Origin blog.csdn.net/kirinlau/article/details/129166785