社交链接按钮不显示图标

问题描述 投票:0回答:1

我正在使用nextjs构建我的个人网站,并且尝试添加带有图标的社交链接按钮,但该图标未显示。

  <button onClick={() => window.open('github.com')}>
    <i href="/github_icon.png"/>
  </button>

而且我的github_icon.png在公共文件夹中。当我转到localhost:3000 / github_icon.png

时,仍然可以看到该图像
html reactjs next.js
1个回答
© www.soinside.com 2019 - 2024. All rights reserved.