鼠标悬停更改tr bgcolor在IE中无效

时间:2011-10-14 02:21:46

标签: javascript css

这是页面。 http://iu91.com/rs/sale/

右侧列表中包含mouseover&amp; mouseout更改<tr> bgcolor功能。

它在Safari,Chrome和Firefox中运行良好,但在IE中无效。

我尝试使用开发人员工具在IE中调试它,我可以看到bgcolor的值已经改变,但颜色仍然是白色。

我认为代码是正确的。也许问题出在CSS中。任何人都可以帮我一把吗?

我没有使用background:transparent;

1 个答案:

答案 0 :(得分:1)

这是因为你的样式表base.css

css Style

中查看base.css
body, div, dl, dt, dd, ul, ol, li, h1, h2, h3, h4, h5, h6, pre,
form, fieldset, input, p, blockquote, table,caption, thead ,tfoot, th, td, embed, object {
    padding:0;
    margin:0; 
    outline:0; 
    /*vertical-align:baseline;*/
    background:transparent;
    font-family:'Microsoft YaHei',Verdana,Arial,STHeiti, Georgia;
    }

从中删除标记td

body, div, dl, dt, dd, ul, ol, li, h1, h2, h3, h4, h5, h6, pre,
    form, fieldset, input, p, blockquote, table,caption, thead ,tfoot, th, embed, object {
        padding:0;
        margin:0; 
        outline:0; 
        /*vertical-align:baseline;*/
        background:transparent;
        font-family:'Microsoft YaHei',Verdana,Arial,STHeiti, Georgia;
        }
相关问题