Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/image/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
HTML img未加载_Html_Image - Fatal编程技术网

HTML img未加载

HTML img未加载,html,image,Html,Image,我已经尝试了每一种不同的图像以及不同的图像路径,但我仍然无法让这个图像弹出。我正在尝试将图像上载到我的github网页。我一直在使用chrome,但我检查过它在其他浏览器上也不起作用 <div class="full text_align_right_img"> <img src="C:\Users\Collin\source\repos\mcghecol\mcghecol.github.io\images\

我已经尝试了每一种不同的图像以及不同的图像路径,但我仍然无法让这个图像弹出。我正在尝试将图像上载到我的github网页。我一直在使用chrome,但我检查过它在其他浏览器上也不起作用

<div class="full text_align_right_img">
                    <img src="C:\Users\Collin\source\repos\mcghecol\mcghecol.github.io\images\headshot.jpg" style="width:inherit; height:inherit" />
                </div>

在“网页”中创建一个名为“img”的文件夹,并将图像“headshot.jpg”放在“img”文件夹中

 <html>
        <head>
            <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
            <title>Image Page</title>
        </head>
        <body>
            <img src="img/headshot.jpg" alt="imageNotDisplayed">
        </body>
    </html>

图像页
注:

1) 了解项目/目录结构非常重要

2) 将UI的所有依赖文件(例如:图像)保留在项目/目录结构中始终是一种好的做法

参考:


请单击,并对问题进行清晰的描述。将代码作为文本而不是图像包含。图像
src
必须是有效的可通过web访问的URL,您提供了文件的路径。例如,
http://example.com/images/headshot.jpg
file://images/headshot.jpg
并确保您的图像未通过CSS隐藏