一张图片上显示多个链接的例子
2015-01-06 11:21
351 查看
<html>
<body>
<p>请点击图像上的星球,把它们放大。</p>
<img
src="http://www.w3school.com.cn/i/eg_planets.jpg" <!---背景图片 背景图片上存在的区域图片可以作为超链接的识别区域-->
border="0" usemap="#planetmap"
alt="Planets" />
<map name="planetmap" id="planetmap"> <!---map是图形控制的标识-->
<!-- 以第一个area为例子:area是每个图形区域
shape : 图像样式 coords: 大小位置 例如:(x,y)=(180,139),r=14 -->
<!-- target:在哪里显示新网页 alt: 提示
href:区域链接 -->
<area
shape="circle"
coords="180,139,14"
href ="http://www.w3school.com.cn/example/html/venus.html"
target ="_blank"
alt="Venus" />
<area
shape="circle"
coords="129,161,10"
href ="http://www.w3school.com.cn/example/html/mercur.html"
target ="_blank"
alt="Mercury" />
<area
shape="rect"
coords="0,0,110,260"
href ="http://www.w3school.com.cn/example/html/sun.html"
target ="_blank"
alt="Sun" />
</map>
<p><b>注释:</b>img 元素中的 "usemap" 属性引用 map 元素中的 "id" 或 "name" 属性(根据浏览器),所以我
们同时向 map 元素添加了 "id" 和 "name" 属性。</p>
</body>
</html>
显示效果在: http://www.w3school.com.cn/tiy/t.asp?f=html_areamap 可查看效果
<body>
<p>请点击图像上的星球,把它们放大。</p>
<img
src="http://www.w3school.com.cn/i/eg_planets.jpg" <!---背景图片 背景图片上存在的区域图片可以作为超链接的识别区域-->
border="0" usemap="#planetmap"
alt="Planets" />
<map name="planetmap" id="planetmap"> <!---map是图形控制的标识-->
<!-- 以第一个area为例子:area是每个图形区域
shape : 图像样式 coords: 大小位置 例如:(x,y)=(180,139),r=14 -->
<!-- target:在哪里显示新网页 alt: 提示
href:区域链接 -->
<area
shape="circle"
coords="180,139,14"
href ="http://www.w3school.com.cn/example/html/venus.html"
target ="_blank"
alt="Venus" />
<area
shape="circle"
coords="129,161,10"
href ="http://www.w3school.com.cn/example/html/mercur.html"
target ="_blank"
alt="Mercury" />
<area
shape="rect"
coords="0,0,110,260"
href ="http://www.w3school.com.cn/example/html/sun.html"
target ="_blank"
alt="Sun" />
</map>
<p><b>注释:</b>img 元素中的 "usemap" 属性引用 map 元素中的 "id" 或 "name" 属性(根据浏览器),所以我
们同时向 map 元素添加了 "id" 和 "name" 属性。</p>
</body>
</html>
显示效果在: http://www.w3school.com.cn/tiy/t.asp?f=html_areamap 可查看效果
相关文章推荐
- 一个TIF文件包含多个文件,如何显示每一张图片
- html基础 图片热点,给一张图片加多个链接
- 多个图标集于一张背景图片在网页上显示指定区域
- html基础 图片热点,给一张图片加多个链接
- opencv第一个例子:读入一张图片并显示
- 一张图片多个链接,点击之后框框显示如何去掉
- jquery 图片 上一张 下一张 链接效果(续篇)
- 如何在用户区显示一张图片
- (源码实例)通过层DIV实现,当鼠标放在链接上面,显示图片及文字
- struts上传与显示图片例子参考(一)
- 图片 上一张 下一张 链接效果
- OPhone/OMS编程:OMS显示图片和拨打电话的例子
- 求助:想实现点击按钮“下一张”就会显示下一张图片的函数
- javaScript 显示图片的例子
- “读书频道”有图片链接显示空页
- 用一张图片作为网页的背景,能让这个图片不管是在普通显示器还是宽屏显示器上都能全屏显示
- 鼠标移动上去就显示一张跟在鼠标的图片JS代码
- (源码实例)通过层DIV实现,当鼠标放在链接上面,显示图片及文字 - 流星絮语 JAVA学习笔记 - CSDNBlog
- 在水晶报表中显示多个链接的数据表内容
- Dreamweaver制作图片多个链接