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 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87
| <HTML>
<head>
<style>
.vertical a {
color: white;
background-color: #000080;
text-decoration: none;
font-weight: bold;
text-align: center;
padding: 5px;
border: 2px outset #c0c0c0;
display: block;
width: 100px;
}
.vertical a:hover {
background-color: #6495ED;
background-image: url(aqua.jpg);
border: 2px inset #c0c0c0;
}
</style>
</head>
<BODY>
<SCRIPT><!--
var RED = {
"1" : 0,
"2" : 0,
"3" : 0
};
var GREEN = {
"1" : 0,
"2" : 0,
"3" : 0
};
var BLUE = {
"1" : 128,
"2" : 128,
"3" : 128
};
var timer = null;
function over(id)
{
RED[id] = RED[id]+5;
BLUE[id] = BLUE[id]-5;
var a = document.getElementById(id);
a.style.backgroundColor = "rgb(" + RED[id] + "," + GREEN[id] + ", " + BLUE[id] + ")";
if (BLUE[id]>-1)
run("over('" + id + "')");
else
stop();
}
function out(id)
{
RED[id] = RED[id]-5;
BLUE[id] = BLUE[id]+5;
var a = document.getElementById(id);
a.style.backgroundColor = "rgb(" + RED[id] + "," + GREEN[id] + ", " + BLUE[id] + ")";
if (RED[id]>-1)
run("out('" + id + "')");
else
stop();
}
function run(x){
timer = setTimeout(x,1);
}
function stop(){
if (timer)
clearTimeout(timer);
}
--></SCRIPT>
<div id="roll" class="vertical">
<p>
<a href="#" id="1" onmouseover="over(this.id)" onmouseout="out(this.id)">1e Bouton</a>
<a href="#" id="2" onmouseover="over(this.id)" onmouseout="out(this.id)">2e Bouton</a>
<a href="#" id="3" onmouseover="over(this.id)" onmouseout="out(this.id)">3e Bouton</a>
</p>
</div>
</BODY>
</HTML> |
Partager