首页htmlaHTML Element Style - 如何在分页控件中的页码之间添加管道和after和last-child

HTML Element Style - 如何在分页控件中的页码之间添加管道和after和last-child

我们想知道如何在分页控件中的页码之间添加管道和after和last-child。

<!DOCTYPE html>
<html>
<head>
<style type='text/css'>
a:after, span:after {
  content: " |"
}

a:last-child:after {
  content: ""
}
</style>
</head>
<body>
  <a>Previous</a>
  <a>1</a>
  <a>2</a>
  <a>3</a>
  <span>4</span>
  <a>5</a>
  <a>6</a>
  <a>Next</a>
</body>
</html>