Link color remains blue after clicking until clicked somewhere in the viewport

In my CSS I tried to set my browser font color to black using the selector :link, :visited, :hoverand :active, but nothing changes it. I think that my title speaks clearly enough about my problem, but here is a link to my website where I am trying to fix it: http://students.washington.edu/jgb93/info343/portfolio/#/

Basically, if you try to click one of the links on the navigation bar, it will change, it will temporarily turn blue. If I click somewhere else in the viewport, the blue color will return to the black that I want. Any suggestions as to what causes this?

That's all I do for navbar in my HTML, the rest is done in CSS:

            <div id="navbar" class="navbar navbar-default navbar-fixed-top">
            <nav>
                <ul id="navlist">
                    <li class="navitem"><a class="link" ui-sref="home">Home</a></li>
                    <li class="navitem"><a class="link" ui-sref="about">About</a></li>
                    <li class="navitem"><a class="link" ui-sref="contact">Contact</a></li>
                </ul>
            </nav>
        </div>
+4
3

CSS. CSS, , F12 firebug Mozilla Firefox.

, :

.navitem a:focus{color:#000;}
+3

a:focus, bootstrap.css 1104:

a:focus {
  outline: thin dotted;
  outline: 5px auto -webkit-focus-ring-color;
  outline-offset: -2px;
}

a:focus css .

color: whatever you want;
outline: none;
+1

- , .

a:link, . a.

a {
    text-decoration: none !important;
    color: black !important;
}

, .

!important a , css, .

:

a:link {
    text-decoration: none;
    color: black;
}

(main.css 60)

-2

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


All Articles