[英]Image not loading in my html page when using Live Server extension in VS Code
I have started studying web development and decided to use VS Code.我已经开始研究 web 开发并决定使用 VS Code。 It is currently running on a Linux Mint dist (19.03).
它目前在 Linux Mint dist (19.03) 上运行。 Decided to add some extensions, including Live Server so I don't need to constantly hit F5 to see the changes.
决定添加一些扩展,包括 Live Server,这样我就不需要经常按 F5 来查看更改。 Problem is: I inserted an image on my html page and if I open the page through Live Server, the picture just doesn't show up, but if I go to the HTML file and open it, it shows perfectly.
问题是:我在我的 html 页面上插入了一张图片,如果我通过 Live Server 打开页面,图片就不会显示,但如果我将 go 插入 HTML 文件并完美显示它。 Could someone help me with this issue?
有人可以帮我解决这个问题吗? Thank you: I am leaving the code here so you can have a look:
谢谢:我将代码留在这里,以便您查看:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>DOM</title>
</head>
<script src="dom.js"></script>
<body>
<img src="/../HTML/me.jpg" />
</body>
</html>
/../ in the img src tag does not look correct. /../ 在 img src 标签中看起来不正确。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.