Help make sure that when you hover the mouse over a div, the text jumped over it (hint). Any standard function can eat? If there is no such means, I think you can create another div and make it invisible, and show it on hover (but this is in my opinion a new bicycle).
<div id="aaa" onmouseout="funk2()" onmouseover="funk1()" </div> <div id="aaa2"></div> <style> #aaa { position: absolute; top: 0px; left:0px; width: 50px; height: 50px; z-index: 1; } #aaa2 { position: absolute; top: 0px; left: 0px; width: 50px; height: 50px; z-index: 2; visibility: hidden; } </style> <script> function funk1() { id: aaa2.style.style.visibility = "visable"; } function funk2() { id: aaa2.style.style.visibility = "hidden"; } </script>
I looked at the examples, but something, they are so scary (maybe even cross-browser compatibility). Rather, I did not understand anything. But I think this could be made easier. For example:
<!DOCTYPE HTML> <html> <title>aaa</title> <head> <style> #aaa { position: absolute; top: 0px; left:0px; width: 50px; height: 50px; z-index: 1; background:red; } #aaa2 { position: absolute; top: 0px; left: 0px; width: 100px; height: 20px; z-index: 2; visibility: hidden; background:yellow; } #spantext { position: absolute; top: 0px; left: 0px; font:10px/1.5em Arial,serif; } </style> <script> timer=null; function funk1(ideelementa,ideelementatext,text) { id: ideelementatext.style.text = text;\\\ ето не правильно. timer = setInterval(function(){move(ideelementa)},10); id: ideelementa.style.visibility = "visable"; } function funk2(ideelementa) { clearInterval(timer) id: ideelementa.style.visibility = "hidden"; } function move(ideelementa) { mouse_x=functiongetmouse_x() ; mouse_y=functiongetmouse_y() ; id: ideelementa.style.left =mouse_x+"px"; id: ideelementa.style.top =mouse_y+"px"; } function functiongetmouse_x() { mousex=\\.........как не знаю return (mousex); } function functiongetmouse_y() { mousey=\\.........как не знаю return (mousey); } </script> </head> <body> <div id="aaa" onmouseout="funk2(aaa2,spantext,какойто текст)" onmouseover="funk1(aaa2)" </div> <div id="aaa2"><span id="spantext"></span></div> </body> </html>
At that time, when I thought about this method. I found that there is a title property). For example: <span id = "ide" title = "some kind of text"> But it works 1 time if you don’t mind the element.