某些类型的图像在 HTML 中无法正确显示

Certain types of images aren't displayed correctly in HTML

我是前端开发新手,正在尝试显示来自此 API https://dash.valorant-api.com/endpoints/agents.

的图像

虽然像 https://media.valorant-api.com/agents/5f8d3a7f-467b-97f3-062c-13acf203c006/displayicon.png 这样的图像可以很好地与 <img> 标签一起使用,但是像这样的图像:

https://media.valorant-api.com/agents/5f8d3a7f-467b-97f3-062c-13acf203c006/abilities/ability1/displayicon.png

https://media.valorant-api.com/agents/5f8d3a7f-467b-97f3-062c-13acf203c006/abilities/ability2/displayicon.png

当我尝试将它们加载到网站时只显示空白,我知道这与图像类型有关,但我不知道如何正确显示它们。

检查您的 html 背景颜色(例如:body { background-color: black; },可能是因为您的背景颜色为白色并且其中两个图像是白色符号。顺便说一下,最后一张照片无论如何都不起作用。returns de api 的错误。