【发布时间】:2023-03-26 04:30:01
【问题描述】:
我正在尝试通过.png 文件为我的网站创建自定义徽标,只要我输入代码并通过本地主机测试运行它,该文件就不会显示徽标图像。
- 重命名
.png文件 - 检查拼写
- 检查大小写
- 尝试在中间添加“-”(“holyland-logo.png”)
- 尝试添加棕色(“images/brown-holylandlogo.png”)
<html>
<head>
<title>HolyLand Souveniers</title>
<link rel="stylesheet" href="style.css">
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css">
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css">
<script src="https://code.jquery.com/jquery-3.3.1.slim.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.7/umd/popper.min.js"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js"></script>
</head>
<body>
<div class="top-nav-bar">
<div class="search-box">
<img src="images/holylandlogo.png" /> (This is causing the issue)
<input type="text" class="form-control">
<!--This is a search box -->
<span class="input-group-text"><i class="fa fa-search"></i></span>
<!--Search Icon -->
</body>
</html>
我希望徽标出现在网站的左上角,但它没有做任何事情吗,它只是给我一个没有 .png 徽标图片的 X。My file pathing and folders as requested in the comments
【问题讨论】:
-
您的文件/文件夹结构是什么?您用于访问该网站的 URL 是什么?
-
Chrome 调试控制台对此问题有何看法?