Ich habe auf gw-tactics.de gesehen, dass man wenn man über ein Bild fährt so ein Fenster öffnen kann. Wie haben die dass da gemacht?
www.gw-tactics.de/charactercreator/show.php?id=2391
Einfach über die Bilder mit dem Mauszeiger fahren
Hier kann eine Notiz zum Merk-Eintrag hinzugefügt werden (optional)
Geschlossen |
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 | <?php //******************************************** //********* Initialisierung ****************** //******************************************** //------------------------------------------------------- // // initialisierung mit inlclude"Pfad\layerclass.php"; // echo initlayer(); // //------------------------------------------------------- function initlayer() { $counter = 0; return ' <script language= "JavaScript" type= "text/javascript" > <!-- document.onmousemove = checkPosition; function checkPosition(e) { if (document.all) { mausX = event.clientX + document.body.scrollLeft; mausY = event.clientY + document.body.scrollTop; } else { mausX = e.pageX; mausY = e.pageY; } } function alertpos(dname) { if (document.layers) { document.layers[0].left = mausX; document.layers[0].top = mausY; } else if (document.getElementById) { document.getElementById(dname).style.left = mausX + "px" ; document.getElementById(dname).style.top = mausY + "px" ; } document.getElementById(dname).style.display = "inline" ; } function hiddpos(dname) { document.getElementById(dname).style.display = "none" ; } //--> </script> '; } //******************************************** //********* Layer einfügen ****************** //******************************************** //------------------------------------------------------- // // layer einfügen mit echo layer(<layer>,<objekt>,<width>,<height>); // z.B. echo layer("Mein Layer","Huhu","200","200"); // layer und objekt können auch html Code beinhalten. // //------------------------------------------------------- function layer( $layer , $obj , $w , $b ) { if ( $b == 0) $b = 100; if ( $w == 0) $w = 100; $counter ++; return ' <div onmouseover= "hiddpos(\'infodiv'.$counter.'\')" class = "layer" id= "infodiv'.$counter.'" style= "position:absolute; top:50; left:50; display:none; width:'.$w.'; height:'.$b.';" > '.$layer.' </div> <div onmouseout= "hiddpos(\'infodiv'.$counter.'\')" onmouseover= "alertpos(\'infodiv'.$counter.'\')" > '.$obj.' </div> '; } ?> |
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 | <script language="JavaScript" type="text/javascript"> <!-- document.onmousemove = checkPosition; function checkPosition(e) { if(document.all) { mausX = event.clientX + document.body.scrollLeft; mausY = event.clientY + document.body.scrollTop; } else { mausX = e.pageX; mausY = e.pageY; } } function alertpos(dname) { if (document.layers) { document.layers[0].left = mausX; document.layers[0].top = mausY; } else if (document.getElementById) { document.getElementById(dname).style.left = mausX + "px"; document.getElementById(dname).style.top = mausY + "px"; } document.getElementById(dname).style.display = "inline"; } function hiddpos(dname) { document.getElementById(dname).style.display = "none"; } //--> </script> |
1 2 3 4 5 6 | <div onmouseover="hiddpos('infodiv1')" class="layer" id="infodiv1" style="position: absolute; top: 50px; left: 50px; display: none; width: 200px; height: 200px;"> #### Was eingeblendet werden soll z.B: Bild </div> <div onmouseout="hiddpos('infodiv1')" onmouseover="alertpos('infodiv1')"> #### Das Objekt wo es eingeblendet werden soll z.B: Link oder so </div> |
1 | <img src="http://img382.imageshack.us/img382/3073/buildrushento7.jpg" alt="Build" border="0"> |
1 2 3 4 5 6 | <div onmouseover="hiddpos('infodiv1')" class="layer" id="infodiv1" style="position: absolute; top: 50px; left: 50px; display: none; width: 200px; height: 200px;"> 2. Bild </div> <div onmouseout="hiddpos('infodiv1')" onmouseover="alertpos('infodiv1')"> <img src="http://img382.imageshack.us/img382/3073/buildrushento7.jpg" alt="" border="0"> </div> |
Geschlossen | ||
![]() |
Zurück zu HTML, PHP, SQL,... |