摘要标签内的锚标签不起作用

时间:2019-07-03 15:53:18

标签: html

我必须创建带有详细信息和摘要标记的选项卡,并希望除打开的细节之外的所有详细信息的摘要标记都包含锚点,以便当您单击摘要部分时,它会打开另一个页面,但是锚点标记不管用。这是当前代码的摘要(不包括标签样式):

我很确定href的值是正确的链接。

<details id="panel1" open="open">
    <summary>Main</summary>
    <!--- code of the open page --->
</details>
<details id="panel2">
    <summary>
        <a href="thelink">title</a>
    </summary> 
    <!--- anchor does not redirect --->
</details>

0 个答案:

没有答案