<div>----</div>
div::before {
  content: "before";
  background-color: #b2ebf2;
  padding: 1%;
}

div::after {
  content: "after";
  background-color: #ffccbc;
  padding: 1%;
}
View Compiled

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

This Pen doesn't use any external JavaScript resources.