来领礼包啦!每天均可领,红包更大啦!进[支付]宝搜索词542337256领取

在CSS中ul li居中,效果如下

Html

<div class="pagination_box">
  <ul class="pagination">
    <li class="disabled"><span>«</span></li>
    <li class="active"><span>1</span></li>
    <li><a href="https://www.soscoon.com?page=2">2</a></li>
    <li><a href="https://www.soscoon.com?page=2" rel="next">»</a></li>
  </ul>
</div>

Css

.pagination_box {
  text-align: center;
}
.pagination {
  width: 100%;
  display: inline-block;
}
.pagination li {
  display: inline-block;
  font-weight: 400;   
  color: #666;
  border-radius: 4px;
  width: 40px;
  height: 40px;
  line-height: 38px;
  margin: 0 3px;
  box-sizing: border-box;
  background-color: #fff;
  border: 1px solid #E9E9E9;
  -webkit-box-sizing: border-box;
  -moz-box-sizing: border-box;
}
.pagination li a {
  color: #666;
}
.pagination li a, .pagination li span {
  width: 40px;
  height: 40px;
  display: inline-block;
} 
.pagination .active {
  background: #ffd100;
  border: 1px solid #ffd100;
  color: #333;
}
.pagination .disabled {
  cursor: default;
}