/* body and .text are NOT required for the blinking cursor. */
body { background: black }

.text { 
  position: relative;
  display: inline-block;
  font-family: Monaco, Arial, Helvetica, sans-serif;
  line-height: 24px;
  font-size: 24px;
  color: white;
  min-width: 5px;
}

.text::after {
  content: "";
  position: absolute;
  top: 0;
  right: -15px;
  /* Remove display: inline-block if not required to be on the same line as text etc */
  display: inline-block;
  background-color: #606060;
  vertical-align: top;
  width: 10px;
  /* Set height to the line height of .text */
  height: 24px;
  /* 
  Animation paramaters:
  blink = animation-name, 
  1s = animation-duration, 
  step-end = animation-timing-function,
  infinite = animation-iteration-count
  */
  -webkit-animation: blink 2s step-end infinite;
  animation: blink 2s step-end infinite;
}

@-webkit-keyframes blink {
  0% { opacity: 1.0; }
  50% { opacity: 0.0; }
  100% { opacity: 1.0; }
}

@keyframes blink {
  0% { opacity: 1.0; }
  50% { opacity: 0.0; }
  100% { opacity: 1.0; }
}