简体   繁体   English

图像 (.png) 未显示在 Chrome 中

[英]Image (.png) not shown in Chrome

I made an image in paint.net and saved as .png.我在paint.net 中制作了一个图像并保存为.png。 The image borders are visible, but there is no imagecontent.图像边框可见,但没有图像内容。 This is my code:这是我的代码:

HTML HTML

<a href="home.php"><img id="logo" href="../img/templog.png" /></a>

CSS CSS

#logo {
  align: left;
  display: inline;
  width: 100px;
  height: 100px;
}

Inside the brackets, there is a preview of the image and in the web (chrome) there are only borders..在括号内,有图像的预览,而在 web (chrome) 中只有边框..

thanks谢谢

您是否尝试过在 chrome 中使用不同的图像来查看是否加载?

Try to change the second href with src, <img id="logo" src="../img/templog.png" />尝试使用 src, <img id="logo" src="../img/templog.png" />更改第二个 href

any types of image should appear in chrome任何类型的图像都应该出现在 chrome 中

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

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