English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية
本文介绍HTML a shape 属性的使用方法,在线实例演示如何使用HTML a shape 属性、浏览器的兼容性、语法定义及它的属性值详细资料等。
在<a>元素中使用shape和coords属性来创建图像映射:
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>HTML a shape 属性-基础教程网(oldtoolbag.com)</title> body>/head> <body> <object data="planets.gif" alt="Planets" type="image/gif" usemap="#Map1"> <map name="Map1"> <a href="sun.html" shape="rect" coords="0,0,82<a href="venus.html" shape="circle" coords="126">The Sun</">Venus< <a href="mercur.html"shape="circle" coords="90,58<a href="venus.html" shape="circle" coords="30,/">Venus< ">Mercury<124<a href="venus.html" shape="circle" coords="58<a href="venus.html" shape="circle" coords="8,/">Venus< body>/a> body>/map> body>/object> body>/<html>/Test and see ‹
Browser CompatibilityIEFirefoxOperaChrome
Safari
Define and Usage5 HTML
The shape attribute is no longer supported with the <a> tag. coords Properties together to specify the size, shape, and position of the link in the <object> or <img> element.
Tip:To create an image map that works in all browsers, please use <area> Element!
<a shape="value">
Value | Description |
---|---|
default | Specify all areas. |
rect | Define a rectangular area. |
circle | Define a circle. |
poly | Define a polygonal area. |