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
|
<script language="Javascript">
function showinfo(Haut,Gauche,Htr,Lgr,Texte)
{
Haut=parseInt(Haut) - (parseInt(Htr)* 0.1);
Gauche=parseInt(Gauche) + parseInt(Lgr) +10 ;
var InfoBulle = document.getElementById('infobulle')
InfoBulle.style.top= Haut;
InfoBulle.style.left= Gauche;
InfoBulle.innerHTML= Texte;
InfoBulle.style.visibility= 'visible';
}
</script>
</head>
<body>
<div id="infobulle" style="position: absolute; padding:5; font-family: verdana; font-size:10; top:0;left:0; background-color:yellow; border: solid 1; visibility:hidden; width:80; height:100; z-index:2; overflow:wrap;"></div>
<div id="image1" style="position: absolute; top:200; left:150; height:189; width:220;border:0;background-color:green" onmouseover="showinfo(this.style.top,this.style.left,this.style.height,this.style.width,'Ici \<br \/\> je colles un premier texte d\'explication ou d\'aide sur l\'objet');" onmouseout="document.getElementById('infobulle').style.visibility= 'hidden';" >coucou</div>
<div id="image2" style="position: absolute; top:100; left:150; height:89; width:100;border:0;background-color:red" onmouseover="showinfo(this.style.top,this.style.left,this.style.height,this.style.width,'Ici je colles un premier texte d\'explication ou d\'aide sur l\'objet');" onmouseout="document.getElementById('infobulle').style.visibility= 'hidden';" >coucou</div>
<div id="image2" style="position: absolute; top:250; left:150; height:200; width:50;border:0;background-color:blue" onmouseover="showinfo(this.style.top,this.style.left,this.style.height,this.style.width,'Ici je colles un premier texte d\'explication ou d\'aide sur l\'objet');" onmouseout="document.getElementById('infobulle').style.visibility= 'hidden';" >coucou</div>
<div style="height:50px; width:50px;background-color:pink;bottom:0;" title="hello
hello2">dsfqs</div>
</body>
</html> |
Partager