<div> <span tabindex="0">按tab键或者click</span> </div>
div { text-align: center; } span:foucs { outline: none; } span:focus-visible { outline: 1px solid red; }
This Pen is owned by Pengfei Wang on CodePen.
See more by @AhCola on CodePen
This Pen doesn't use any external CSS resources.
This Pen doesn't use any external JavaScript resources.