reactjs - 如何使用 ReactTable 更改标题的样式

标签 reactjs react-table

我需要将默认样式更改为下面的样式

最佳答案

尝试添加以下 css。您必须正确定位箭头。

rt-resizable-header -sort-desc:after {
  width: 0; 
  height: 0; 
  border-left: 20px solid transparent;
  border-right: 20px solid transparent;
  content : ' ';
  border-top: 20px solid #000;
}

rt-resizable-header -sort-asc:after {
  width: 0; 
  height: 0; 
  border-left: 20px solid transparent;
  border-right: 20px solid transparent;
  content : ' ';
  border-bottom: 20px solid #000;
}
.ReactTable .rt-thead .rt-th.-sort-desc, .ReactTable .rt-thead .rt-td.-sort-desc {
    box-shadow: none;
}

关于reactjs - 如何使用 ReactTable 更改标题的样式,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52594909/

相关文章:

node.js - MERN Stack - Express 和 React 在同一端口上?

javascript - 正常的 GET 请求在 Chrome (API) 中不起作用

javascript - 无法使用 react 在 meteor 中显示来自Mongo的数据

javascript - 在按钮上单击显示 react 表

javascript - react 表 : TypeError: Cannot read property 'forEach' of undefined 问题

javascript - 如何向 react 表添加新行

javascript - 如何在 React 16+ 中动态添加类?

reactjs - Electron + react 深层连接

reactjs - 如何在单击图标时将下拉列表添加到 react 表

javascript - 状态改变时 Mobx 不更新