PageSpeed によると、私の新しい CSS スプライト ナビゲーションは効率的な CSS セレクターを使用していません。
誰かが私が間違っていることを教えてもらえますか?
Very inefficient rules (good to fix on any page):
ul.navmenu li a Tag key with 2 descendant selectors and Class overly qualified with tag
ul.navmenu li.home a Tag key with 2 descendant selectors and Class overly qualified with tag and Class overly qualified with tag
ul.navmenu li.home a:hover Tag key with 2 descendant selectors and Class overly qualified with tag and Class overly qualified with tag
私のCSS:
ul.navmenu li a { display: block; background: url('/styles/pc-nav-sprite.png'); }
ul.navmenu li.home a { background-position: 0 -486px; width: 187px; height: 24px; margin-top: 16px;}
ul.navmenu li.home a:hover { background-position: 0 -511px; width: 187px; height: 24px; }
HTML :
<ul class="navmenu">
<li class="home"><a class="selected" title="Home"></a></li>
<li class="forum"><a href="/forum/" title="Forum"><span class="displace">Forum</span></a></li>
...
...
</ul>
これについて何か助けていただければ幸いです。ありがとう。