HTML图形映射技术

可移动到上图区域测试 查看效果

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>无标题文档</title>
</head>

<body>
<img src="4903018_145830091181_2.jpg" usemap="#Test"/>
<map name="Test" style="border:1px solid red;100px;height:100px;" >
    <area  style="border:1px solid red;100px;height:100px;" shape="rect" onmousemove="javascript:alert('鼠标移动到了矩形映射区域');" coords="400,50,500,100"/>
</map>
</body>
</html>
原文地址:https://www.cnblogs.com/cnjava/p/2590180.html