页面图像动态加热区,(使用map标签)
2007-09-17 10:31
169 查看
在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>
<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>
相关文章推荐
- 页面图像动态加热区,(使用map标签)
- 页面图像动态加热区,(使用map标签)
- HTML-图像的使用(img标签和map标签的使用)
- 页面图像加热区 image map使用
- jsp中使用c:if动态加载一些属性到标签 jsp中添加锚点,页面自动定位
- 在使用ajax拼写动态页面的时,使用jquery出现了找不到拼接的标签这一问题
- html中的图像使用map标签
- 在Html中,图像使用map标签 [转]
- (2010-08-24)html中的图像使用map标签
- jsp页面动态展示list-使用<select>和<c:forEach>标签
- 在Html中,图像使用map标签
- 页面侧边栏:使用自定义模板标签
- 使用struts2标签<s:action无法显示引用页面问题
- 最流行强大的页面标签框架 display:table 使用
- 动态生成页面(一)——ASP.NET中Literal使用
- MAVEN项目中JSP页面使用JSTL标签
- 使用phantomjs抓取JS动态生成的页面
- JSP页面中使用JSTL标签出现无法解析问题解决办法
- asp.net 中使用iframe动态加载页面
- 如何在html静态页面中使用struts2标签