IE6 下 `文字` 設定 `.wdqy:hover` 不生效,滑鼠懸停無反應。
IE6 只有**擁有 `href` 屬性的 `` 元素**才被視為可互動鏈接,才會觸發 `:hover` 偽類。無 `href` 的 `` 被視為錨點,不支援 `:hover`。
<!-- ❌ 無 href,IE6 hover 失效 -->
<a class="wdqy">aaa</a>
<!-- ✅ 加上 href="#", IE6 hover 生效 -->
<a href="#" class="wdqy">aaa</a>
.wdqy {
display: inline-block; width: 100px; height: 30px;
background: url(common.png) no-repeat -35px -694px;
padding-right: 15px; text-indent: -9999px; /* 文字隱藏 */
}
.wdqy:hover { background-position: -35px -753px; }