显示一张图像,一张图像不在html中

发布于 2025-01-25 04:03:02 字数 703 浏览 1 评论 0原文

我在HTML中有2个图像,其中一张显示,但第二个图像不是,我试图在第二个图像中放置另一个不同的图像,但仍未显示。两者都处于同一路径中。

<a class="navbar-brand" href="#">
    <img id="borderIcono" th:src="@{/images/icono_prueba.png}" width="60" height="60" alt=""/></a>
<button ng-click="cargando = true" ng-disabled="cargando">
    <img th:src="@{/images/redo.png}" class="redoBoton"/>
</button>

我还试图将第二张图像放在按钮外,没有类属性,但仍未显示。因此CSS不是问题。
我试图互换它们,第一个可以看到第二个是在第一个位置,但在第一个方面仍然没有看到。
在检查中,浏览器告诉我无法加载图像。
我知道这两个图像都位于同一文件夹中,因此两者都应访问。

I have 2 images in html, one is shown, but the second one is not, I have tried to put another different image in the second one but it is still not shown. Both are in the same path.

<a class="navbar-brand" href="#">
    <img id="borderIcono" th:src="@{/images/icono_prueba.png}" width="60" height="60" alt=""/></a>
<button ng-click="cargando = true" ng-disabled="cargando">
    <img th:src="@{/images/redo.png}" class="redoBoton"/>
</button>

I have also tried to put the second image outside the button and without the class attribute, but it is still not displayed. So the css is not the problem.
I have tried to interchange them and the first one is seen where the second one is but the second one is still not seen in the place of the first one.
In inspect the browser tells me that the image could not be loaded.
I know that both images are in the same folder, so both should be accessible.

enter image description here

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

美人骨 2025-02-01 04:03:02

我发现了错误,服务器没有将图像放在编译的应用程序中,也就是说,我将文件放在源文件夹中,但是当我运行它时,它会读取目标文件夹中的任何内容。

I found the bug, the server was not putting the image inside the compiled application, that is, I put the file in the source folder, but when I run it, it reads whatever is in the target folder.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文