Jquery Firefox中的$.css()存在问题

Jquery Firefox中的$.css()存在问题,jquery,Jquery,在这种情况下,我想根据单击值调用某个元素。当链接包含图像时,我希望显示图像,否则我希望加载html页面。我已经设置了这个条的样式,在加载html页面时关闭整个页面,就像加载图像一样。假设我有这个css(这是加载html页面时的样式) 我使用以下代码来显示正在加载的图像。这工作得非常好,除了closebar是用样式表中定义的背景色设置的 $("#shadow").add($("#shadowContent")).fadeIn(500); $("#shadowContent").animat

在这种情况下,我想根据单击值调用某个元素。当链接包含图像时,我希望显示图像,否则我希望加载html页面。我已经设置了这个条的样式,在加载html页面时关闭整个页面,就像加载图像一样。假设我有这个css(这是加载html页面时的样式)

我使用以下代码来显示正在加载的图像。这工作得非常好,除了closebar是用样式表中定义的背景色设置的

$("#shadow").add($("#shadowContent")).fadeIn(500);    
$("#shadowContent").animate({width:'250px',height:'250px'},500).css({top:'25px',left:'50%',margin:'0 0 0 -125px',padding:'10px !important'}).empty().append('<div id="closebar"><a href="#close" id="closeBox">'+closeText+'</a></div>').append('<div id="content"></div>');
$("#closebar").animate({width:'250px'},500).css({background:'white !important',padding:'5px 0 !important'});
$("#closebar a").css({color:'#323232','font-weight':'bold',background:'url(http://www.cherrytrees.nl/tmp/Core/Images/closeIcon.jpg) left center no-repeat',padding:'0 0 0 20px'});
$("#content").animate({width:'230px',height:'230px'},500).css({margin:'0',padding:'90px'}).html("<div id='imageSelectPrevious'><a href='#' id='prevImageLink' class='imageNavLink' title='' rel='prev'>Previous</a></div><div id='imageSelectNext'><a href='#' id='nextImageLink' class='imageNavLink' title='' rel='next'>Next</a></div><img id='popImageContainer' src='http://www.cherrytrees.nl/tmp/Core/Images/load.gif' style='margin:0'></div>");
$("#prevImageLink").add($("#nextImageLink")).hide();
好的,我现在有一些代码来检查图像,得到尺寸和所有东西。当图像完全加载时,我运行以下代码来更改容器尺寸并显示图像

$("#shadowContent").animate({width:newWidth+'px',height:newHeight+'px'},500).css({top:'25px',left:'50%',margin:'0 0 0 -'+(newWidth / 2)+'px !important'});
$("#content").animate({width:newWidth+'px',height:newHeight+'px'},500).css({margin:'0',padding:'0 !important'});
$("#closebar").animate({width:newWidth+'px'},500);
$("#popImageContainer").css({padding:'0 !important'});
现在,这在Chrome和Safari(即未经测试)中运行良好,但Firefox使用
#ebdfd3
背景设置了关闭栏的样式,以某种方式在图像中添加了填充,并弄乱了容器元素的位置

是的,样式表包含在我的文档中javascript的上面

考虑到它在Chrome和Safari中工作的事实,我真的不知道该怎么办。。也许有人听说过这样的事情吗

问题解决了
!重要信息
导致问题!它现在可以正常工作了!!谢谢

不要使用
!重要提示
:它在这种情况下不起作用。

单独使用代码是非常困难的,尤其是当您没有提供出错的详细信息时。您可能还需要显示一个实时链接,我觉得有问题的是
0!重要的
重要的东西真的有必要吗?是的,我认为你不能包括
!重要的
脚本中的标志如下。。。至少我从来并没有让它为我工作过。你们将不得不使用Firebug以交互方式修补CSS,并通过实验确定发生了什么。哦!事实上,这是最重要的!导致错误的重要因素!现在很好用!!谢谢
$("#shadowContent").animate({width:newWidth+'px',height:newHeight+'px'},500).css({top:'25px',left:'50%',margin:'0 0 0 -'+(newWidth / 2)+'px !important'});
$("#content").animate({width:newWidth+'px',height:newHeight+'px'},500).css({margin:'0',padding:'0 !important'});
$("#closebar").animate({width:newWidth+'px'},500);
$("#popImageContainer").css({padding:'0 !important'});