我已使用HTML map
和area
标记在图片中创建矩形热点。现在我正试着看看页面加载时图像上的热点在哪里。如何在HTML中显示热点区域?是否需要使用CSS或JQuery,或者正确的方法是什么?
<div id="container1" class="container" style="background: #CFCFCF">
<img id="1" usemap = "mymap" src="http://www.goodhousekeeping.com/cm/goodhousekeeping/images/ue/ghk-dogs-Australian-Shepherd-mdn.jpg" />
</div>
<div id="container2" class="container" style="float:right;background: #FFFFFF">
<img id="2" usemap = "mymap" src="http://www.goodhousekeeping.com/cm/goodhousekeeping/images/ue/ghk-dogs-Australian-Shepherd-mdn.jpg" />
</div>
<div id="container3" class="container" style="background: #CFCFCF">
<img id="3" usemap = "mymap" src="http://www.goodhousekeeping.com/cm/goodhousekeeping/images/ue/ghk-dogs-Australian-Shepherd-mdn.jpg" />
</div>
<map name="mymap" id="mymap" ">
<area id="m1" shape="rect" coords="87,355,130,392" href="http://www.google.com" target="_blank" />
</map>
答案 0 :(得分:0)
请原谅我,如果我说的是明显的,但假设你总是希望它可见,为什么不只是编辑实际的图像?
Alternativley,这里有一个可能有帮助的建议:Visible Area tag?