html area标签 语法

html area标签 语法

作用:带有可点击区域的图像映射

说明:<img> 中的 usemap 属性可引用 <map> 中的 id 或 name 属性(由浏览器决定),所以我们需要同时向 <map> 添加 id 和 name 两个属性。直线电机选型

注释:<area> 标签定义图像映射中的区域(注:图像映射指得是带有可点击区域的图像)。area 元素总是嵌套在 <map> 标签中。<img> 标签中的 usemap 属性与 map 元素 name 属性相关联,创建图像与映射之间的联系。

html area标签 示例

<!DOCTYPE html>

<html lang="en">

<head>

    <meta charset="UTF-8">

    <title>Title</title>

</head>

<body>

<img src="http://www.php.cn/tpl/Index/Static/img/banner7.jpg" border="0" usemap="#studymap" alt="study" />

<map name="studymap" id="studymap">

    <area shape="circle" coords="180,139,14" href ="http://www.php.cn"  />

    <area shape="circle" coords="129,161,10" href ="http://www.php.cn"  />

    <area shape="rect" coords="0,0,110,260" href ="http://www.php.cn"  />

</map>

</body>

</html>

原文地址:https://www.cnblogs.com/furuihua/p/11918598.html