2017-04-13 2 views
-1

現在、私のソーシャルメディアページのアイコンはハイパーリンクされていません。私はそれがhrefに囲まれていると何らかの理由でそれが動作していない。誰かが私を助けてくれますか?画像がハイパーリンクされていません

HTMLコード:

<!DOCTYPE html> 
 
<html> 
 
<head> 
 
\t <meta name="viewport" content="width=device-width, initial-scale=1"> 
 
\t <title></title> 
 
\t <style type="text/css"> 
 
\t html{ 
 
\t height: 100%; 
 
\t width: 100%; 
 
\t top: 0; 
 
\t left:0; 
 
\t overflow: hidden; 
 
\t } 
 
\t .background{ 
 
\t position: fixed; 
 
\t z-index: -1000; 
 
\t width: 100%; 
 
\t height: 100%; 
 
\t overflow: hidden; 
 
\t top: 0; 
 
\t left: 0; 
 
\t } 
 
\t #background-video{ 
 
\t position: absolute; 
 
\t top: 0; 
 
\t left: 0; 
 
\t min-height: 100%; 
 
\t min-width: 100%; 
 
\t } 
 
\t .content{ 
 
\t position: absolute; 
 
\t width: 100%; 
 
\t min-height: 100%; 
 
\t z-index: 1000; 
 
\t } 
 
\t .content h1{ 
 
\t font-family:Comic Sans MS, sans-serif; 
 
\t text-align: center; 
 
\t font-size: 200px; 
 
\t text-transform: uppercase; 
 
\t font-weight: 700; 
 
\t color: #ffffff; 
 
\t margin-bottom: 1px; 
 
\t } 
 
\t .content h3{ 
 
\t text-align: center; 
 
\t font-size: 24px; 
 
\t letter-spacing: 3px; 
 
\t color: #ffffff; 
 
\t margin-bottom: 1px; 
 
\t } 
 
\t img { 
 
\t padding-left: 10px; 
 
\t padding-right: 10px; 
 
\t } 
 
\t .social-media-icons{ 
 
\t z-index: 1000; 
 
\t text-align: center; 
 
\t display: block; 
 
\t padding-top: 35%; 
 
\t } 
 
\t </style> 
 
</head> 
 
<body> 
 
\t <div id="background" class="background"> 
 
\t \t <video id="background-video"autoplay muted loop> 
 
\t \t \t <source src="background.mp4" type="video/mp4"> 
 
\t \t </video> 
 
\t </div> 
 
\t <div class="content"> 
 
\t <h1>A-T</h1> 
 
\t <h3>ONLINE PORTFOLIO DESIGNED BY </h3> 
 
\t </div> 
 
\t <div class="social-media-icons"> 
 
\t \t <a target="_blank" href=""><img class="facebook" src="facebook.png" alt="Facebook" width="40px" height="40px"></a> 
 
\t \t <a target="_blank" href=""><img class="twitter" src="twitter.png" alt="Twitter" width="40px" height="40px"></a> 
 
\t \t <a target="_blank" href=""><img class="LinkedIn" src="linkedin.png" alt="LinkedIn" width="40px" height="40px"></a> 
 
\t \t <a target="_blank" href=""><img src="googleplus.png" alt="Google Plus" width="40px" height="40px"></a> 
 
\t \t <a href=""><img src="email.png" alt="Email" width="40px" height="40px"></a> \t 
 
\t </div> 
 
</body> 
 
</html>

上記のhtmlコードは、それを囲むと、ソーシャルメディアのアイコンがあります。これはZインデックスのためですか?それは私がこの時点で想定することができる唯一のものです。

答えて

0

タグごとにhrefの宛先を追加する必要があります。

<a target="_blank" href="https://www.facebook.com"><img class="facebook" src="facebook.png" alt="Facebook" width="40px" height="40px"></a> 
+0

私はそれをやったことがありますが、それでも私のためにはまだ動作しません。 – catung555555

1

私はこれはあなたが探しているものだと思う:

あなたのコンテンツの高さが最小高さに設定されている:100%;これにより、コンテンツ部門がソーシャルメディア部門をカバーしています。

クリック可能にするには、Z-インデックスを追加して正しいことを実行しましたが、位置指定がない場合はZ-インデックスは機能しません。あなたが相対的に位置を設定する場合、彼らはどのようにして表示されます。また、hrefタグに宛先が必要です。

.social-media-icons{ 
    position:relative; 
    z-index: 1000; 
    text-align: center; 
    display: block; 
    padding-top: 35%; 
} 
+0

ありがとうございます! – catung555555

関連する問題