为什么我的图像没有在 ReactJS 中显示?

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

我正在制作一个网站,但 img 没有显示,您只能看到 img 图标,但看不到 img 本身,有人可以帮助我吗?

enter image description here

enter image description here

我尝试了很多东西,但它不会显示

html reactjs
1个回答
-1
投票

所以基本上你必须采取方法来做到这一点:

1

<img src={required("./yourimagepath")}
alt="徽标"/>
2
import logo from "./yourimagepath"  <img src={logo} alt="logo" />

© www.soinside.com 2019 - 2024. All rights reserved.