2

I am creating a menu that each item has a text and in hover an email replaces. So I do not know how to remove the text in hover.

here is my code so far:

#home {
    font: 30px 'LeagueGothicRegular', Arial, sans-serif;
    color: #f9f8cc;
}

#home:hover {
    background:url(style/images/icon/home.png) #FFF;
    background-size: 83px 56px;
}
4

4 に答える 4

3

color: を :hover で透明に設定できます

于 2013-06-03T18:12:58.733 に答える
1

If someone is looking for another and a much simpler approach, simply add this to your CSS hover container:

font: 0/0 a;

More information about the font shorthand property here: Another CSS image replacement technique

于 2014-08-25T00:28:33.127 に答える