【问题标题】:Logo isn't clickable after changing position absolute更改绝对位置后,徽标不可点击
【发布时间】:2016-01-19 04:44:34
【问题描述】:
<div id="header-logo-image">
    <a href="http://example.com/" rel="home">
        <img src="http://example.com/wp-content/uploads/2016/01/head-logo.png />
    </a>
</div>
#header-logo-image {
    position: absolute;
    top: 0;
    left: 0;
    float: none;
    text-align: center;
    margin-bottom: 10px;
    padding-right: 0;
}
#header-logo-image img {
    width: 60%;
    float: left;
}

移动我的徽标后,指向我主页的链接似乎消失了。当我将鼠标悬停在 &lt;a&gt; 部分时,它会显示尺寸为 0 x 0。

是否缩小img甚至使其绝对位置会导致重置href链接。

由于图片是动态尺寸,60% 我不能在 a 部分指定尺寸

【问题讨论】:

标签: css


【解决方案1】:

更改您的代码行:

<img src="http://example.com/wp-content/uploads/2016/01/head-logo.png" /></a></div>

【讨论】:

    猜你喜欢
    • 2016-08-24
    • 2012-05-26
    • 1970-01-01
    • 1970-01-01
    • 2016-06-04
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多