You must first reference the JQ framework.
Then let's take a look at the effect: (the connection cannot be added) You can only view the Haha image for the time being. For the specific effect, see "Play Games" in "My Box" on the left of My blog ":
The following code provides specific annotations.
Let's take a look at the Code:
Copy codeThe Code is as follows:
<Div id = "_ gameinfo" style = "width: 158px; border: 1px # FFC solid; background-color: # FFF; position: fixed; z-index: 101; display: none; padding: 1px; ">
</Div>
<Div id = "thegameBox" style = "text-align: center;">
<A href = "javascript:;" alt = "WASD key controls the movement of the little girl, and the arrow key controls the movement of the little boy. traps of different colors can only accommodate people of different colors! "Name =" binghuoren "> shenlin contact </a>
<A href = "javascript:;" alt = "click to capture. "Name =" zhishangqiu "> IQ Ball 3 </a>
<A href = "javascript:;" alt = "move the mouse to control the movement of the manipulator, and click the left button to release the magnetic force to seize the goods. "Name =" yunshuchuan "> ship captain's transport </a>
</Div>
<Script type = "text/javascript" src = "jquery. js"> </script>
<Script type = "text/javascript">
$ (Document). ready (function (){
$ ("# ThegameBox a"). mousemove (function (ev ){
Var _ Imgsrc = "http://www.bkjia.com/uploads/allimg/131016/23422L525-1.jpg"; // here you need to set the element name the same as your image name
Var _ Ways = $ (this). attr ("alt"); // obtain the alt of the element pointed to by the current mouse
$ ("# _ Gameinfo"). show (); // display the prompt Layer
If (! Ev) {ev = window. event;}; // check whether it is IE
Document. getElementById ("_ gameinfo"). style. left = (ev. clientX + 10) + "px"; // you can specify left as the X-axis distance + 10px of the mouse.
Document. getElementById ("_ gameinfo"). style. top = (ev. clientY + 10) + "px"; // you can specify top as the X-axis distance + 10px of the mouse.
$ ("# _ Gameinfo" 2.16.html (' <br/> '+' <font color =" blue "> operation method: </font> '+ _ Ways + ''); // add content to the prompt layer and input parameters
}). Mouseout (function (){
$ ("# _ Gameinfo"). hide (); // hide the hide layer when you move the cursor away from the element.
})
})
</Script>