Delete the outline frame that appears after clicking an item on my page

Each time I click an element on my page, a black line appears indicating the borders of the elements.

enter image description here

enter image description here

Is there a way to not show this line at all?

Change after decision What I called the boundary track is actually the outline used to facilitate access (for example, when using Tab to move) and actually needs to be saved, or an alternative used in its place. Read the MarkPlewis comment below and the link to his answer, as well as Dirk-Jan's comment on his own answer in more detail.

+4
source share
3 answers

, .

, :

*:focus {
    outline: 0;
}

, , , .

+9

. . , . CSS, .

*:focus {
    outline: none;
}

.

-, -. WCAG 2.0 AA : " , , , ".

+3

, CSS:

*:focus {
    outline: 0;
}

. * - . :focus - , . , , CSS outline.

+1

Source: https://habr.com/ru/post/1615266/


All Articles