How to change the color of the link after the link has been accessed?

0

Using bootstrap

        <div class="well well-sm">
            <ul  class="list-group">
                <li class="list-group-item text-left"><strong>QUESTIONÁRIO</strong></li>
                <li class="list-group-item text-left"><a href="<?php echo URL ?>formulario?bloco=1" ></a></li>
                <li class="list-group-item list-group-item-grey text-left"><a href="<?php echo URL ?>formulario?bloco=2" onclick="page()">PATROCINADORES E INSTITUIDORES</a></li>
                <li class="list-group-item text-left"><a href="<?php echo URL ?>formulario?bloco=3">C</a></li>
                <li class="list-group-item list-group-item-grey text-left"><a href="<?php echo URL ?>formulario/passivo?bloco=4"></a></li>
            </ul>
        </div>

I tried to use:

a:visited {
    color: pink;
}

All links stay pink, even those visited.

    
asked by anonymous 07.06.2016 / 02:35

1 answer

2

Customizing your element via the : selector in your stylesheet.

<!DOCTYPE html>
<html>
<head>
<style>

a.green:visited {
    color: green;
}
a.black:visited {
    color: black;
}
a.red:visited {
    color: red;
}

</style>
</head>
<body>

<a class="green" href="http://pt.stackoverflow.com/">SOPT</a><br>
<a class ="black"href="http:/http://pt.stackoverflow.com/users/34755/denalioasis">denalioasis</a><br>
<a class="red" href="http://pt.stackoverflow.com/users/45437/magichat">MagicHat</a>

<p><b>Clico mudou ! GL, ;)</b></p>

</body>
</html>

If you want to customize 1 to 1, you have to put an identifier for each or a class (id="identifier" or class="yourClass")

    
07.06.2016 / 03:30