<div>
  <span tabindex="0">按tab键或者click</span>
</div>
div {
  text-align: center;
}
span:foucs {
  outline: none;
}

span:focus-visible {
  outline: 1px solid red;
}

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

This Pen doesn't use any external JavaScript resources.