0

これがIE6で機能しない理由を誰でも理解できますか。ホバー画像はまったく表示されず、背景色に置き換えても表示されません。絶対パスと相対パスを試しました。誰かが私の間違いを指摘してくれたら幸いです。ありがとうございました。

CSS

.buttonMailTrue:hover {
    width:290px;
    height: 44px;
    background: url('http://localhost/sample/users/images/mail_icon_strip_hover.png') no-repeat;
    background-repeat: no-repeat;
}

JS

<script type="text/javascript">
    $(function() {
        $('.buttonMailTrue').hover(function() {
            $(this).addClass('hover');
        }, function() {
            $(this).removeClass('hover');
        });
    });
</script>

HTML

<div class='msgTrue buttonMailTrue' data-message='%s' data-subject='%s' data-rowdate='%s' data-from='%s'>
    <img src="images/sml_new_mail_icon.gif" class="mailIcon" alt="" />
    $subject;
    <div style="float:right;margin-right:22px;margin-top:-12px;font-size:9px;">
        $rowdate
    </div><br />
    span style="font-weight:bold;margin-top:50px;">$from</span>
</div>
<br />
4

1 に答える 1

2

これを試して:

  1. 「.buttonMailTrue:hover」を「.hover」に変更
  2. SPAN タグの先頭に「<」を追加します。
  3. 「background-repeat: no-repeat;」を削除 2回宣言しているので、CSSから。
  4. CSS に背景位置の値をいくつか追加します。
于 2012-11-19T10:45:50.773 に答える