【发布时间】:2015-12-01 20:32:05
【问题描述】:
我正在尝试创建一个如下所示的 HTML 图像映射(请在下面找到我的代码):
h1 {
background-color: red;
}
<h1> This is Frame A </h1>
<img src="http://image.slidesharecdn.com/thesolarsystem-100324192727-phpapp01/95/the-solar-system-2-728.jpg?cb=1269517813" width="500" height="300" alt="Planets" usemap="#planetmap">
<map name="planetmap">
<area shape="circle" coords="450,208" href="https://www.nasa.gov/sites/default/files/706436main_20121114-304-193blend_m6-orig_full.jpg" alt="Sun">
<area shape="circle" coords="305,124" href="http://vignette2.wikia.nocookie.net/heman/images/3/36/Earth.jpg/revision/latest?cb=20130912205625" alt="Earth">
<area shape="circle" coords="652,122" href="https://upload.wikimedia.org/wikipedia/commons/8/85/Venus_globe.jpg" alt="Venus">
</map>
图片显示在网页上,但是,太阳、地球和金星并没有变成可点击的东西,因此我可以将其定向到各自的图片。请让我知道我做错了什么?我是否正确指定了坐标?
我使用了以下Image Generator 来找出坐标:
【问题讨论】: