html{
background-color:#abb2bc;
}
body{
margin:0;
}
h1 {
margin:0;
background-color: #363b42;
}
img{
width:250px;
}
.navbar{
text-align:center;
}
.blogpost{
background-color:white;
padding:5%;
margin:3%
}
#blogheader{
margin-top:15px;
}
.blogimage{
margin-top:25px;
}
<!DOCTYPE html>
<html>
<head>
<title>GamingCoachBlog</title>
<link rel="stylesheet" type="text/css" href="style.css">
</head>
<body>
<header>
<div class="navbar">
<h1>GamingCoach</h1>
</div>
</header>
<main>
<div class="blogpost">
<h2 id="blogheader">Recent Blog Posts</h2>
<a href="/Users/david/Desktop/Blog/Articles/Ten Fortnite Tips For Season 8/index.html"><img class="blogimage" src="/Users/david/Desktop/Blog/Images/How to get more wins in Fortnite.png" alt="How to get more wins in Fortnite"></a>
</div>
</main>
</body>
</html>
我将我的github存储库连接到我的NetLify网站,并且加载正常。在我的github存储库中,它有一个图像文件夹,但我的图像不会加载。我也有一个链接设置到图像,该图像中有另一个HTML文件链接到它,但是每当我单击它时,它都会说找不到页面。请解释为什么会发生这种情况。
您必须指定要链接的路径,或者不知道您要指向的位置。
<!DOCTYPE html>
<html>
<head>
<title>GamingCoachBlog</title>
<link rel="stylesheet" type="text/css" href="style.css">
</head>
<body>
<header>
<div class="navbar">
<h1>GamingCoach</h1>
</div>
</header>
<main>
<div class="blogpost">
<h2 id="blogheader">Recent Blog Posts</h2>
<a href="C:/Users/david/Desktop/Blog/Articles/Ten Fortnite Tips For Season 8/index.html"><img class="blogimage" src="C:/Users/david/Desktop/Blog/Images/How to get more wins in Fortnite.png" alt="How to get more wins in Fortnite"></a>
</div>
</main>
</body>
</html>