<p class="my-element loader">
I can add the class 'loader' when I need it.
</p>
.my-element {
  background-color: lightyellow;
  font-family: sans-serif;
}
.loader::after {
  content: "";
  background: url(https://holasvg.com/my-loader.svg) no-repeat;
  display: inline-block;
  background-size: 50px;
  vertical-align: middle;
  height: 50px;
  width: 50px;
}

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

This Pen doesn't use any external JavaScript resources.