代码之家  ›  专栏  ›  技术社区  ›  JCKnoell

链接不可点击。锚不起作用

  •  0
  • JCKnoell  · 技术社区  · 11 年前

    我在页面顶部的社交媒体图标上有锚链接。据我所知,链接和锚点的编码是正确的。

    但由于某种原因,我无法使图标可点击。

    网址为www.cleantelligent.com

    以下是图标本身的代码:

    <!--SOCIAL LINKS-->
    <style>
    #UpperLinks{ position: absolute; left: 50%; margin-left: 380px; white-space: nowrap;     padding-top: 27px;}
    #UpperLinks img{ width:auto;}
    #PhoneTop{ font-family: 'News Cycle', sans-serif; color:#D1D1D1; position: absolute; left: 50%; margin-left: 345px; white-space: nowrap; margin-top: -12px;}
    </style>
    <div id="PhoneTop">
    <img style="position:relative; top: 8px;" src="/wp-content/themes/cleantelligent/images/phonetrans.png" />(801) 375-0375</div>
    <div id="UpperLinks">
    <a href="http://www.linkedin.com/company/cleantelligent_software" target="_blank" >
    <img height="22" width="22" src="/wp-content/themes/cleantelligent/images/linkedin.png" /></a>
    <a href="https://twitter.com/#!/CleanTelligent1" target="_blank" >
    <img height="22" width="22" src="/wp-content/themes/cleantelligent/images/twitter.png" /></a>
    <a href="http://www.facebook.com/CleanTelligent" target="_blank" >
    <img height="22" width="22" src="/wp-content/themes/cleantelligent/images/facebook.png" /></a>
    <a href="https://www.youtube.com/CTsoftware" target="_blank" >
    <img class="socialicons" height="22" width="22" src="/wp-content/themes/cleantelligent/images/YouTubePlay.png" /></a>
     </div>
    
    
    <!--END OF SOCIAL LINKS-->
    
    2 回复  |  直到 11 年前
        1
  •  1
  •   Deryck    11 年前

    将“UpperLinks”设置为高于5的z索引,或者删除此z索引。它覆盖了你的链接。

    <div class="slide" style="position: absolute; top: 0px; left: 0px; display: block; z-index: 5; ............
    </div></div>
    

    编辑: 你的整个页面上有太多的z索引。你应该可以将div=UpperLinks设置为z索引:30。

        2
  •  1
  •   user1864610 user1864610    11 年前

    你的问题不在你发布的片段中。您已经创建了 <div> id为的 slider-1 涵盖了您创建的链接。覆盖链接的部分是透明的,所以不明显。链接由另一个覆盖 <分区> 你将无法点击它们。

    尝试给链接一个 z-index 大于 <分区> 覆盖了他们。