反应分页样式

Jas*_*Jin 5 html css reactjs

我正在使用react-js-pagination npm 包,但样式对我不起作用。

import Pagination from "react-js-pagination";
import "bootstrap/less/bootstrap.less";
Run Code Online (Sandbox Code Playgroud)

bootstrap.less 已移至 scss。所以我尝试使用 bootstrap.scss,但效果不佳。

样式坏了,如何修复?

小智 2

您可以手动尝试一下。这对我有用。

.pagination {
  justify-content: center;
}

ul {
  list-style: none;
  padding: 0;
}

ul.pagination li {
  display: inline-block;
  width: 30px;
  border: 1px solid #e2e2e2;
  display: flex;
  justify-content: center;
  font-size: 25px;
}

ul.pagination li a {
  text-decoration: none;
  color: #337ab7;
  font-size: 20px;
}

ul.pagination li.active a {
  color: white;
}
ul.pagination li.active {
  background-color: #337ab7;
}

ul.pagination li a:hover,
ul.pagination li a.active {
  color: blue;
}

.page-selection {
  width: 48px;
  height: 30px;
  color: #337ab7;
}

.pagination-wrapper {
  display: flex;
  justify-content: space-between;
  margin-top: 10px;
}
Run Code Online (Sandbox Code Playgroud)