对于我的生活,这不起作用,我无法弄清楚为什么..
<div class="b2s-popup" id="hideaway">
<img src="back-in-groove.jpg" usemap="b2schoolpop" />
<map name="b2schoolpop" id="b2schoolpop">
<area shape="rect" coords="304,289,403,308" href="#" />
<area shape="rect" coords="365,-6,426,24" href="javascript:;" onClick="document.getElementById('hideaway').style.display='none';" />
</map>
</div>
答案 0 :(得分:1)
我是个白痴。 Usemap应该是“#b2schoolpop”而不是“b2schoolpop”
答案 1 :(得分:0)
试试这个;
<div class="b2s-popup" id="hideaway">
<img src="back-in-groove.jpg" usemap="b2schoolpop" />
<map name="b2schoolpop" id="b2schoolpop">
<area shape="rect" coords="304,289,403,308" href="#" />
<area shape="rect" coords="365,-6,426,24" href="javascript:document.getElementById('hideaway').style.display='none';" />
</map>
</div>
或者
<div class="b2s-popup" id="hideaway">
<img src="back-in-groove.jpg" usemap="b2schoolpop" />
<map name="b2schoolpop" id="b2schoolpop">
<area shape="rect" coords="304,289,403,308" href="#" />
<area shape="rect" coords="365,-6,426,24" href="javascript:void(0);" onclick="javascript:document.getElementById('hideaway').style.display='none';" />
</map>
</div>