开发者

When hover change text issue

I am trying to make it so that when you hover your mou开发者_如何学Cse over a "box" it changes the text inside it. However, there seems to be a line break between the checkmark/errormark and the Following or Unfollow. Why?

HTML:

<a class="afp" href="demo.html">
<span class="addfriend2">
<span class="fr1">
<font color="#33FF00">&#x2713;</font > Following
</span>
<span class="fr2">
<font color="#FF0000">&#x2717</font> Unfollow
</span>
</span>
</a>

CSS:

 .addfriend2 {
        border-radius: 15px;
        background: #517eca;
        padding: 8px;
        margin-left: 30px;
        text-align: center;
        font-size: 14px;
    }
    a.afp{
        text-decoration: none;
        color:#000000;
    }
    a.afp:visited{
        text-decoration: none;
        color:#000000;
    }
    a.afp:active{
        text-decoration: none;
        color:#000000;
    }
    span.fr2{
        display:none;
    }
a.afp:hover span.fr1{
    display:none;
}
a.afp:hover span.fr2{
    display:inline;
}


Strangely enough the problem was fixed when adding the missing semi-colon before Unfollow.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜