Faire clignoter un lien ?
Bonjour,
Je me demandais s'il était possible de faire clignoter un lien (pas avec un effet de disparition, mais deux couleurs différentes afin que le lien soit toujours visible et cliquable).
J'ai trouvé un code correspondant pour du texte, mais je n'arrive pas à l'appliquer à un lien :
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30
| <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Couleur Test</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<script type="text/javascript">
function blinker(id,c1,c2)
{
elm = document.getElementById(id);
setTimeout(function() {setInterval(function () {elm.style.color=c1;},1000);},500);
setInterval(function () {elm.style.color=c2;},1000);
}
</script>
</head>
<body>
<span id="a">texte</span>
<span id="a"><a href="re.html" class="menu">lien</a></span>
<script type="text/javascript">
blinker('a','#ffff00','#FF00C2');
</script>
</body> |
Est-ce que quelqu'un aurait une solution et pourrait m'aider ?
Merci et bonne soirée,
SH