我正在尝试映射图像,以便它将某些部分链接到不同的页面,我需要另一双眼睛

  • 本文关键字:眼睛 一双 链接 映射 图像 些部 html
  • 更新时间 :
  • 英文 :


我无法链接到我正在使用的图像的某些部分。即使我看了无数次。其他人可以看看我的代码是否关闭。

    <img id="gtxports" alt="GTX Titan Black Ports" 
    src="https://i.ibb.co/h9y4V3S/gtxtitanports.jpg" usemap="gtxpports">
    <map name="gtxpports" id="gtxPortsMap">
	  	<area alt="Dual DVI D" title="Dual DVI D" href="dualdviD.html" 
    shape="rect" coords="1045, 453, 1653, 633" />
	  	<area alt="Dual DVI I" title="Dual DVI I" href="dualdvii.html" 
    shape="rect" coords="1045, 773, 1653, 969" />
	  	<area alt="HDMI Port" title="HDMI Port" href="hdmi.html" shape="rect" 
    coords="577, 829, 861, 965" />
	  	<area alt="DisplayPort" title="DisplayPort" href="displayport.html" 
    shape="rect" coords="193, 825, 525, 969" />
    </map>

不确定您在哪里以及如何引用 html 链接,因为我相信它在您的本地计算机上。重写现有代码对我来说很好,请参阅以下内容:

    <img id="gtxports" alt="GTX Titan Black Ports" 
    src="https://i.ibb.co/h9y4V3S/gtxtitanports.jpg" usemap="gtxpports">
    
    <map name="gtxpports" id="gtxPortsMap">
        <area href="https://google.com" alt="Dual DVI D" title="Dual DVI D" target="_blank" shape="rect" coords="1045, 453, 1653, 633" />
        <area href="https://google.com" alt="Dual DVI I" title="Dual DVI I" target="_blank" shape="rect" coords="1045, 773, 1653, 969" />
        <area href="https://google.com" alt="HDMI Port" title="HDMI Port" target="_blank" shape="rect" coords="577, 829, 861, 965" />
        <area href="https://google.com" alt="DisplayPort" title="DisplayPort" target="_blank" shape="rect" coords="193, 825, 525, 969" />
    </map>

您可以通过 https://htmledit.squarefree.com/或任何其他实时 html 查看器实时测试这一点。将 google.com 替换为您的链接以查看它是否有效,如果它不起作用,那么您引用的 html 页面的目的地可能存在一些问题。

最新更新