How to change the color of the link after the link was accessed?

Asked

Viewed 2,959 times

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>

tried to use :

a:visited {
    color: pink;
}

all links turn pink, even the ones visited.

  • 2

    They turned pink probably because you already clicked on them, try opening in an iconic session of your browser

1 answer

2

Customizing your element through the selector :visited, in your style sheet.

<!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="/">SOPT</a><br>
<a class ="black"href="http://users/34755/denalioasis">denalioasis</a><br>
<a class="red" href="/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="suaClasse")

Browser other questions tagged

You are not signed in. Login or sign up in order to post.