首页 > 解决方案 > 制作html页面时无法访问我的照片

问题描述

你好我制作一个简单的html网站只是为了练习。
我在名为“nexus mods”的网站上上传了一张 jpg 图像,并尝试使用 html 访问该图像。我认为我给出了错误的 src 地址,但我不确定如何解决这个问题。
这是 nexus https://www.nexusmods.com/newvegas/images/112580
上图片的链接, 这是我的 html 代码:

<img src="https://www.nexusmods.com/newvegas/images/112580" alt="Legion boy">

我不确定这个地址有什么错误我一步一步做的:

1- 访问我之前提到的网站
2- 找到我上传的图片
3- 从地址栏中复制地址并将其粘贴为我的 src

标签: html

解决方案


您在 URL 的末尾写了双引号。您应该右键单击图像并选择Copy image URL. 这是工作代码。

<img src="https://staticdelivery.nexusmods.com/images/130/66728631-1552854368.jpg" alt="Legion boy">

推荐阅读