2016-10-12 7 views
0

イメージを表示しようとしましたが、動作しません。 <img>タグの末尾にある/を削除しようとしましたが、どちらも機能しません。私のファビコンも表示されず、私は理由を知らない。 は、ここに私のコードです:IMGとFaviconが表示されない

img.check { 
 
    width: 15%; 
 
    margin-top: 150px; 
 
    margin-left: 790px; 
 
} 
 
.text { 
 
    font-family: 'Roboto', sans-serif; 
 
    font-size: 20px; 
 
    margin-top: 150px; 
 
    margin-left: 625px; 
 
} 
 
.redirect { 
 
    font-family: 'Roboto', sans-serif; 
 
    font-size: 8px; 
 
    margin-top: 50px; 
 
    margin-left: 830px; 
 
    color: blue; 
 
} 
 
.redirect:hover { 
 
    color: black; 
 
    text-decoration: none; 
 
}
<!DOCTYPE html> 
 

 
<head> 
 
    <link href="https://fonts.googleapis.com/css?family=Roboto:300" rel="stylesheet"> 
 
    <title>Your Password has been changed.</title> 
 
    <link rel="icon" type="image/png" href="img/zimbrafav.png" /> 
 
</head> 
 

 
<body> 
 
    <img src="img/check.png" class="check" alt="check"> 
 
    <div class="text"> 
 
    <p> 
 
     <h1>Your password has been changed!</h1> 
 
    </p> 
 
    </div> 
 
    <div class="redirect"> 
 
    <p> 
 
     <h1><a href="http://google.be/">Go to Google > </a></h1> 
 
    </p> 
 
    </div> 
 

 
</body> 
 

 
</html>

+1

に変わるのでしょうか? –

+0

あなたのhtmlファイルはホストされていますか、それともローカルでテストしましたか? –

+0

htmlファイルがホストされています。彼らはimg –

答えて

0

かなりわからないが、あなたの代わりに、絶対の相対パスで作業しているので、多分それです。

ので

<img src="img/check.png" class="check" alt="check"/> 

は、イメージが(あなたがそれらを使用しているファイルへの相対)置かれているフォルダで

<img src="/img/check.png" class="check" alt="check"/> 
+0

はまだ動作しません。 –

関連する問題