标志图像在html



我尝试使用html和css来放置徽标。下面是我尝试的代码

<!Doctype html>
<html lang='en'>
<head>
<link rel="stylesheet" type="text/css" href="Assignment/css">
</head>
<body>
<div class="responsive">
<div>
<a  title="Comp_logo" href="">
<img alt="logo"   src="Assignment/images/logo.png">
</a>
</div>
</div>
</body>

</html>

我使用sublime文本编辑器,所以当我打开索引文件时,这是我看到的图片

崇高文本

如果你想让图像在http://www.yourdomain.com/Assignment/images/logo.png

这样的文本编辑器中显示,你需要为图像和css使用绝对路径

确保图像路径正确。例如,如果您的文件夹结构是:

|-Assignment
|----images
|--------logo.png
|----css
|----index.html

…那么你的图片的路径应该是images/logo.png .

最新更新