<div class="hide-phone-number">123-456-7890</div>
.hide-phone-number {
  display: inline-block;
  font-family: monospace, monospace;
  position: relative;
}

.hide-phone-number::after {
  content: "XX-XXXX";
  background: white;
  position: absolute;
  right: 0;
}

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

This Pen doesn't use any external JavaScript resources.