When the mouse slides over the picture, the preview large image will appear, and there will be introductory text below the large image.
The code copy is as follows:
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Image prompt effect.aspx.cs" Inherits="Image prompt effect" %>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title></title>
<style type ="text/css" >
.aa{
width:88px;
height :100px;
}
</style>
<script type ="text/javascript" src ="Scripts/jquery-1.7.1.js" ></script>
<script type ="text/javascript" >
$(function () {
var x = 10;
var y = 20;
$("a.tooltip").mouseover(function (e) {
this.myTitle = this.title;
this.title = "";
var imgTitle = this.myTitle ? "<br/>" + this.myTitle : "";
var tooltip = "<div id='tooltip'><img src='" + this.href + "' alt='Product Preview Picture'/>" + imgTitle + "</div>"; //Create <div >Elements
$("body").append(tooltip); //Append it to text
$("#tooltip")
.css({
"top": (e.pageY + y) + "px",
"left": (e.pageX + x) + "px"
}).show("fast"); //Set x and y coordinates and display
}).mouseout(function () {
this.title = this.myTitle;
$("#tooltip").remove(); //Remove
}).mousemove(function (e) {
$("#tooltip")
.css({
"top": (e.pageY + y) + "px",
"left": (e.pageX + x) + "px"
});
});
})
</script>
</head>
<body>
<form id="form1" runat="server">
<div >
<a href ="image/4.jpg" class ="tooltip" title ="shoes"><img src="image/4.jpg"/> </a>
<a href ="image/5.jpg" class ="tooltip" title ="gloves"><img src="image/5.jpg"/> </a>
<a href ="image/6.jpg" class ="tooltip" title ="skirt"><img src="image/6.jpg"/> </a>
<a href ="image/7.jpg" class ="tooltip" title ="bag"><img src="image/7.jpg"/> </a>
</div>
</form>
</body>
</html>