アイコンとテキストの 2 つの div を持つロゴがあります。デフォルトでは、テキストは非表示になっており、ユーザーがマウスをアイコンの上に置いたときにのみ表示されます。残念ながら、それは機能していません。
これは私のHTMLコードです:
<h1 class="site-title"><a href="http://localhost/themes/" rel="home">
<div id="logo-icon">
<img src="http://localhost/themes/wp-content/theme/img/logo_icon.png" class="anim">
</div>
<div id="logo-text">
<img src="http://localhost/themes/wp-content/theme/img/logo_text.png" class="anim">
</div>
</a></h1>
CSS:
#logo-text, #logo-icon {
display: inline;
float: left;
}
#logo-text img.anim {
opacity: 0;
}
#logo-icon img:hover #logo-text img.anim {
opacity: 1;
}