简体   繁体   English

图片未显示在HTML网页中

[英]Image not displaying in HTML webpage

I have opened this webpage in all browsers, but none of them display the image. 我已经在所有浏览器中打开了此网页,但是没有一个显示图像。 It only leaves an empty space in that area, however if you right click on that area then the typical menu appears. 它仅在该区域中留有空白区域,但是,如果右键单击该区域,则会显示典型菜单。 When I choose open image in new tab, it doesnt display anything at all, in spite of the picture being stored in the correct folder 当我在新选项卡中选择打开图像时,尽管图片存储在正确的文件夹中,但它根本不显示任何内容

The code used here is, 这里使用的代码是

<td colspan="2" rowspan="2">
    <img src="images/advert1.jpg" width="192" height="253" alt="">
</td>

However if I replace the path as 但是,如果我将路径替换为

"C:/wamp/www/images/advert1.jpg" 

Then it shoes a small box in that area, yet the picture is not displayed 然后,它在该区域穿了一个小盒子,但图片未显示

There's nothing wrong with your syntax (that I can see). 您的语法没有问题(我可以看到)。 Make sure that the image exists at that path and that is has the correct unix permissions (assuming that you are running a unix based system). 确保该路径上存在该映像,并且该映像具有正确的unix权限(假设您正在运行基于unix的系统)。 Any images much be readable by the world, not just you. 任何图像,不仅您自己,都是世界可读的。

C:\\ Users \\,然后输入您的个人资料名称以及保存图片的任何位置.png或.jpg

The same problem happened to me first, so I again saved the file on another location in the computer, then the browser starts displaying the image. 首先,我遇到了同样的问题,所以我再次将文件保存在计算机的另一个位置,然后浏览器开始显示图像。 try saving your file and the image on a separate file and save them on a different location. 请尝试将文件和图像保存在单独的文件中,然后将它们保存在其他位置。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM