为什么我的图像在某些页面上不显示?
我正在使用 React-js 来设计我的网站。我正在制作一个具有多个页面的网站,其URL结构有点像这样:
%PUBLIC_URL%/
├── /home
├── /store
│ ├── /prebuilt
│ └── /parts
├── /services
│ ├── /repairs
│ └── /building
└── /about
当您在页面上时:
%PUBLIC_URL%/home | %PUBLIC_URL%/about | %PUBLIC_URL%/store | PUBLIC_URL%/services
标题中的徽标显示正常。 但是当您进入子页面时,
%PUBLIC_URL%/store/prebuilts | %PUBLIC_URL%/store/parts | etc
徽标图像将不会显示。
我编辑过的所有文件都在这个 github 存储库中:
https://github.com/LukeCripps/Compusell
徽标图像的位置是:
public/img/Logo/Logo.png
I am using react-js to design my website. I am making a website with multiple pages, its URL structure is a bit like this:
%PUBLIC_URL%/
├── /home
├── /store
│ ├── /prebuilt
│ └── /parts
├── /services
│ ├── /repairs
│ └── /building
└── /about
when you are on the pages:
%PUBLIC_URL%/home | %PUBLIC_URL%/about | %PUBLIC_URL%/store | PUBLIC_URL%/services
the logo in the header displays properly.
But when you go into the sub-pages
%PUBLIC_URL%/store/prebuilts | %PUBLIC_URL%/store/parts | etc
the logo image will not display.
All the files that I have edited are in this github repo:
https://github.com/LukeCripps/Compusell
The location of the logo image is:
public/img/Logo/Logo.png
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论