Modify onclick div by posing in firefox

In Firefox, whenever a link is clicked, there is a dashed outline around the element.

Is it possible to change it so that I can select the highlighted div, or adjust the area that it outlines?

+3
source share
3 answers

In CSS:

a:active{outline:0;border:(customize the border around the active link)}

For div (using jQuery):

$(function(){ 
    $('div#your-id').click(function(){ 
        $(this).css({'enter the CSS rules for the div here'}); 
    }); 
});

http://docs.jquery.com/CSS/css#name

+2
source

I think you might want to check out Removing Dotted Links .

If you want to keep the dotted border for tab navigation, apply it to a:active. This still allows the indicator to appear when focusing using the keyboard, but it hides when the mouse is activated:

a:active
{
    outline: none;
}

For all links:

a
{
    outline: none;
}

Mozilla:

:focus
{
    -moz-outline-style: none;
}

. , , , JavaScript, , , .

+3

Css:

:focus {outline:none;}
::-moz-focus-inner {border:0;}
+1
source

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


All Articles