HTML超链接图像仅在超链接时消失?

时间:2012-01-14 05:25:52

标签: html image hyperlink

我为这个简单问题道歉,我确定这个问题的答案是,但每当我将某些图像超链接时(" logo.png"在下面的代码中)它们就不存在了当人们查看页面时,包括没有可点击区域。但是,当没有超链接时,图像显示。任何帮助都会很棒!

PS。我想我会发布整个页面的HTML而不仅仅是一点点的问题代码;更重要的是,是的,我已经验证了图像的目录路径是正确的。

<html>
<head>
<title>Homepage</title>
   <style type="text/css"> 
   @font-face {
    font-family: Raleway;
    src: url(/homefilesfonts/Raleway+Thin.otf) format("opentype");
    }

  @font-face {
    font-family: League Gothic;
    src: url(/homefiles/fonts/League+Gothic.otf) format("opentype");
    }
    body 
    { 
     margin: 0; 
     padding: 0; 
     padding-top: 10px;
     text-align: center; 
    } 
    #centered
    { 
     width: 800px; 
     text-align: left;
     border: 0px; 
     padding: 0;  
     margin: 0 auto; 
    } 
    </style>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body bgcolor="#353535" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
 <div id="centered">

<!-- Save for Web Slices (Homepage.psd) -->
<table id="Table_01" width="928" height="1201" border="0" cellpadding="0" cellspacing="0">
    <tr>
        <td colspan="14">
            <img src="homefiles/images/index_01.png" width="927" height="103" alt=""></td>
        <td>
            <img src="homefiles/images/spacer.gif" width="1" height="103" alt=""></td>
    </tr>
    <tr>
        <td rowspan="2">
            <a href="http://mypage.iu.edu/~asereno/home.html>       
            <img src="homefiles/images/logo.png" width="228" height="60" alt="AlexSereno"></a>
            </td>
        <td colspan="13">
            <img src="homefiles/images/index_03.png" width="699" height="28" alt=""></td>
        <td>
            <img src="homefiles/images/spacer.gif" width="1" height="28" alt=""></td>
    </tr>
    <tr>
        <td colspan="2">
            <img src="homefiles/images/index_04.png" width="88" height="32" alt=""></td>
        <td colspan="2">
            <a href="http://mypage.iu.edu/~asereno/homefiles/sites/aboutme.html">
            <img src="homefiles/images/aboutme.png" width="75" height="32" alt="AboutMe"></a>
            </td>
        <td>
            <img src="homefiles/images/index_06.png" width="43" height="32" alt=""></td>
        <td colspan="2">
            <img src="homefiles/images/contactme.png" width="88" height="32" alt="ContactMe"></td>
        <td colspan="2">
            <img src="homefiles/images/index_08.png" width="49" height="32" alt=""></td>
        <td>
            <img src="homefiles/images/gallery.png" width="63" height="32" alt="Gallery"></td>
        <td colspan="3">
            <img src="homefiles/images/searchbox.png" width="293" height="32" alt="Search"></td>
        <td>
            <img src="homefiles/images/spacer.gif" width="1" height="32" alt=""></td>
    </tr>
    <tr>
        <td colspan="14">
            <img src="homefiles/images/image.png" width="927" height="435" alt="OpenSource"></td>
        <td>
            <img src="homefiles/images/spacer.gif" width="1" height="435" alt=""></td>
    </tr>
    <tr>
        <td colspan="7">
            <img src="homefiles/images/aboutthepage.png" width="465" height="72" alt="About This Homepage"></td>
        <td colspan="7">
            <img src="homefiles/images/i101labs.png" width="462" height="72" alt="I101 Labs"></td>
        <td>
            <img src="homefiles/images/spacer.gif" width="1" height="72" alt=""></td>
    </tr>
    <tr>
        <td colspan="7">
            <img src="homefiles/images/index_14.png" width="465" height="1" alt=""></td>
        <td colspan="6" rowspan="6">
            <img src="homefiles/images/rightbox.png" width="420" height="410" alt="I101 Labs"></td>
        <td rowspan="2">
            <img src="homefiles/images/uparrow.png" width="42" height="88" alt="Scroll Up"></td>
        <td>
            <img src="homefiles/images/spacer.gif" width="1" height="1" alt=""></td>
    </tr>
    <tr>
        <td colspan="7" rowspan="5">
            <img src="homefiles/images/leftbox.png" width="465" height="409" alt="About This Site"></td>

        <td>
            <img src="homefiles/images/spacer.gif" width="1" height="87" alt=""></td>
    </tr>
    <tr>
        <td>
            <img src="homefiles/images/scrollbar.png" width="42" height="69" alt="Scroll Handle"></td>
        <td>
            <img src="homefiles/images/spacer.gif" width="1" height="69" alt=""></td>
    </tr>
    <tr>
        <td>
            <img src="homefiles/images/index_19.png" width="42" height="137" alt=""></td>
        <td>
            <img src="homefiles/images/spacer.gif" width="1" height="137" alt=""></td>
    </tr>
    <tr>
        <td>
            <img src="homefiles/images/downarrow.png" width="42" height="30" alt="Scroll Down"></td>
        <td>
            <img src="homefiles/images/spacer.gif" width="1" height="30" alt=""></td>
    </tr>
    <tr>
        <td rowspan="3">
            <img src="homefiles/images/index_21.png" width="42" height="206" alt=""></td>
        <td>
            <img src="homefiles/images/spacer.gif" width="1" height="86" alt=""></td>
    </tr>
    <tr>
        <td colspan="13">
            <img src="homefiles/images/index_22.png" width="885" height="71" alt=""></td>
        <td>
            <img src="homefiles/images/spacer.gif" width="1" height="71" alt=""></td>
    </tr>
    <tr>
        <td colspan="2">
            <img src="homefiles/images/index_23.png" width="245" height="49" alt=""></td>
        <td colspan="2">
            <img src="homefiles/images/disclaimer.png" width="105" height="49" alt="Disclaimer"></td>
        <td colspan="5">
            <img src="homefiles/images/tweet.png" width="187" height="49" alt="Tweet this site"></td>
        <td colspan="3">
            <img src="homefiles/images/facebook.png" width="220" height="49" alt="Share this on Facebook"></td>
        <td>
            <img src="homefiles/images/index_27.png" width="128" height="49" alt=""></td>
        <td>
            <img src="homefiles/images/spacer.gif" width="1" height="49" alt=""></td>
    </tr>
    <tr>
        <td>
            <img src="homefiles/images/spacer.gif" width="228" height="1" alt=""></td>
        <td>
            <img src="homefiles/images/spacer.gif" width="17" height="1" alt=""></td>
        <td>
            <img src="homefiles/images/spacer.gif" width="71" height="1" alt=""></td>
        <td>
            <img src="homefiles/images/spacer.gif" width="34" height="1" alt=""></td>
        <td>
            <img src="homefiles/images/spacer.gif" width="41" height="1" alt=""></td>
        <td>
            <img src="homefiles/images/spacer.gif" width="43" height="1" alt=""></td>
        <td>
            <img src="homefiles/images/spacer.gif" width="31" height="1" alt=""></td>
        <td>
            <img src="homefiles/images/spacer.gif" width="57" height="1" alt=""></td>
        <td>
            <img src="homefiles/images/spacer.gif" width="15" height="1" alt=""></td>
        <td>
            <img src="homefiles/images/spacer.gif" width="34" height="1" alt=""></td>
        <td>
            <img src="homefiles/images/spacer.gif" width="63" height="1" alt=""></td>
        <td>
            <img src="homefiles/images/spacer.gif" width="123" height="1" alt=""></td>
        <td>
            <img src="homefiles/images/spacer.gif" width="128" height="1" alt=""></td>
        <td>
            <img src="homefiles/images/spacer.gif" width="42" height="1" alt=""></td>
        <td></td>
    </tr>
</table>
<!-- End Save for Web Slices -->
</body>
</html>

1 个答案:

答案 0 :(得分:1)

链接第一张图片时没有关闭引号。

<a href="http://mypage.iu.edu/~asereno/home.html>

这就是问题所在。因此,请关闭引号并再试一次。它会工作。用

替换上面的行
<a href="http://mypage.iu.edu/~asereno/home.html">