html中map标签的用法
来源:互联网 发布:扬州房价 知乎 编辑:程序博客网 时间:2024/05/16 06:14
在Html中,给图像使用map标签,可以给图像的某个部分建立超连接,用法如下:
<img src=img.gif usemap="MAP-Name">
<map name="MAP-Name">
<area shape="rect|circle|poly" coords="#" href="url">
</map>
注:所有的坐标都是相对于图片左上角的
其中,坐标coords对各个shape的解释如下:
shape="rect" coords="x1,y1,x2,y2" // (x1,y1)=Upper Left, (x2,y2)=Lower Right
即,当shape是矩形时,coords表示矩形左上及右下(x2, y2)的坐标
shape="circle" coords="x,y,r" // (x,y)=Center, r=Radius
即,当shape是圆形时,coords表示圆中心点坐标(x, y)及半径
shape="poly" coords="x1,y1,x2,y2,x3,y3..." // (x1,y1>=First Corner, (x2,y2)=Second Corner, ...
即,当shape是poly多边形时,coords表示多边形所有顶点的坐标(x1,y1),(x2,y2),(x3,y3)...
注意:以上所有坐标都是相对于图形img.gif左上脚坐标而言的
以下是一个例子:
<img src="mapimg.gif" usemap="#Face">
<map name="Face">
<area shape="rect" href="page.html" coords="140,20,280,60">
<area shape="poly" href="image.html" coords="100,100,180,80,200,140">
<area shape="circle" href="new.html" coords="80,100,60">
</map>
- html中map标签的用法
- html中<map>标签的用法
- Html中map标签
- HTML中object标签的详细用法
- HTML中常用的标签用法
- HTML中include file标签的用法
- HTML中alt标签的用法
- HTML中include file标签的用法
- jsp中<html:select>标签的用法
- html中embed标签的用法
- html <head>标签中<meta>的用法
- HTML中,标签label的用法!
- 请问html标签中,object标签的用法?
- html标签的用法
- HTML <map>标签的使用
- html map 标签的使用
- HTML Map 标签的使用
- Html中fieldset标签用法
- 使用SQL Server时最容易忽略的21个问题
- 行过滤时应注意的问题
- mschart控件出现“为 ChartImg.axd 执行子请求时出错”的解决方法
- html中marquee标签的使用
- html中embed标签的用法
- html中map标签的用法
- Entity Framework多对多关联映射的实现
- asp.net中自定义控件的引用技巧
- .net中引用dll文件
- HtmlTextBox使用心得
- asp.net 路径问题
- [matlab]矩阵基本内容
- asp.net中在后台通过js弹出新窗口
- 达•芬奇唯一雕塑作品被发现