The :focus Pseudo-class in CSS


Highlight elements like form inputs when they are focused.

Source Code

input:focus {
    border-color: royalblue;
    box-shadow: 0 0 5px 0 royalblue;
}
Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments