firefox扩展中的Opacity和jQuery fadeIn / fadeOut

时间:2010-07-06 01:15:18

标签: javascript jquery css firefox-addon opacity

我很难获得jquery淡化和不透明度的css元素来回应我在我写的firefox扩展中。我正在使用FireFox 3.6。我很确定这两个问题是相关的。

这段代码没有褪色,只需等待四秒钟就可以弹出屏幕:

css_notify_div = {
    position: 'fixed',
    top: '2%',
    right: '2%',
    font: 'bold',
    'font-size': '1.5em',
    'font-family': 'sans-serif',
    'text-align': 'center',
    'background-color': 'ffff88',
    'border': '2px solid #eeee00',
    'padding': '5px',
    margin: 'auto',
    display: 'none'
};


doc = window.content.document;
$('#br_notify_div', doc).css(css_notify_div);

$('#br_notify_div', doc).fadeIn("slow", function () {
    $('#br_notify_div', doc).fadeOut(4000);
});
每次运行时,

fadeTo()也会失败,如果我使用css({opacity:'。2'}),那么也没有任何反应。

编辑:这似乎特定于firefox扩展环境。其他动画工作正常,显示('慢')例如看起来很好。这似乎与使用opacity属性本身有关,它似乎不仅仅是一个jQuery问题。

1 个答案:

答案 0 :(得分:1)

我试了here它似乎工作得很好......?

(Linux上的FF 3.6.6)

相关问题