CSS Property Value How to - after; Add pipeline between page numbers in pagination control








Question

We would like to know how to after; Add pipeline between page numbers in pagination control.

Answer


<!DOCTYPE html>
<html>
<head>
<style type='text/css'>
a:after, span:after {<!--from  ww  w.  j  ava  2s  . c  o  m-->
  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>

The code above is rendered as follows: