gpt4 book ai didi

html - img map 中的最后一个区域标记是做什么用的?

转载 作者:行者123 更新时间:2023-11-28 02:51:55 24 4
gpt4 key购买 nike

所以我正在做一个需要使用 img map 的项目。我对他们没有什么经验,一直在试图理解为什么他们最后的区域标签通常如下所示。

    <img class="img_class" id="squares" src="../images/squares.jpg" usemap="#sq_map">
<map name="sq_map">
<area shape="rect" href="#" coords="120,40,200,120" title="blu" id="1" alt="blu_sq"/>
<area shape="rect" href="#" coords="120,200,200,280" title="red" id="2" alt="red_sq"/>
<area shape="default" nohref="nohref" alt="">
</map>

我的主 map 设置了我的可点击区域,但我不确定第三个标签的用途。是在单击图像时阻止默认进程还是沿着这些线?谷歌在这个话题上出乎意料地毫无成果,但我会同时继续寻找。感谢您的帮助!

最佳答案

<area shape="default" nohref="nohref" alt="">

shape="default"表示选择整个区域。
nohref 表示没有关联的链接。

希望对您有所帮助。 :)

关于html - img map 中的最后一个区域标记是做什么用的?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39085683/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com