当网页上出现透明的PNG时,所有Javascript网站在Firefox 4中执行速度极慢(All Javascript on site performs horribly Slow in Firef

编程入门 行业动态 更新时间:2024-10-07 10:17:16
当网页上出现透明的PNG时,所有Javascript网站在Firefox 4中执行速度极慢(All Javascript on site performs horribly Slow in Firefox 4 when transparent PNG's are present on the page)

ETA更新:我发现,如果我从我的网站中删除所有透明.png文件,大约有5个,它运行良好。 这很奇怪。 增加选票会非常有帮助,我在另外几台电脑上测试了它,4/ 15有这个问题。 谢谢! 有任何想法吗?

在PC Firefox和所有其他浏览器上运行良好,但在Mac Firefox的4/15台计算机上,Javascript速度非常慢,特别是菜单栏。 我在网站外测试了他们,他们工作得很好。 这一直是一个持续的问题很长一段时间,不知道如何解决它。 更新后,如果我从网站中删除透明的PNG,问题就会消失,就像左上角的横幅。

我的网站: http : //thenozzle.net/

所有的javascript在其他浏览器中都比较慢,其中最大的两个是菜单栏和视频播放器。 在这一点上我不能忽视它。

我想知道是不是WordPress的增加,因为js在其他地方工作正常。

有任何想法吗?

ETA:这是我的JS文件:

http://thenozzle.net/wp-content/themes/twentyten/scripts.js

ETA:这是我的菜单栏代码

$(function() { $('#sdt_menu > li').bind('mouseenter',function(){ var $elem = $(this); $elem.find('img') .stop(true) .animate({ 'width':'170px', 'height':'170px', 'left':'0px' },400,'easeOutBack') .andSelf() .find('.sdt_wrap') .stop(true) .animate({'top':'140px'},500,'easeOutBack') .andSelf() .find('.sdt_active') .stop(true) .animate({'height':'170px'},300,function(){ var $sub_menu = $elem.find('.sdt_box'); if($sub_menu.length){ var left = '170px'; if($elem.parent().children().length == $elem.index()+1) left = '-170px'; $sub_menu.show().animate({'left':left},200); } }); }).bind('mouseleave',function(){ var $elem = $(this); var $sub_menu = $elem.find('.sdt_box'); if($sub_menu.length) $sub_menu.hide().css('left','0px'); $elem.find('.sdt_active') .stop(true) .animate({'height':'0px'},300) .andSelf().find('img') .stop(true) .animate({ 'width':'0px', 'height':'0px', 'left':'85px'},400) .andSelf() .find('.sdt_wrap') .stop(true) .animate({'top':'25px'},500); }); });

ETA UPDATE: I've found that if I remove all the transparent .png files from my site, there are about 5, it runs fine. THAT is odd. And up-votes would be very helpful, I tested it on a few more computers, and 4/15 have this issue. Thanks! Any ideas?

Runs fine on PC Firefox and all other browsers, but on 4/15 computers in Mac Firefox, the Javascript is just terribly slow, specifically the menubar. I tested them both outside the site and they worked fine. This has been an ongoing problem for quite some time, no idea how to solve it. Updated, problem goes away if I remove transparent PNG's from the site, like the banner in the top left.

My site: http://thenozzle.net/

All of the javascript is a bit slower then in other browsers, the two largest ones are menubar and video player. I can't ignore it at this point.

I'm wondering if it's something wordpress is adding, because the js works fine elsewhere.

Any ideas?

ETA: Here's my JS file:

http://thenozzle.net/wp-content/themes/twentyten/scripts.js

ETA: Here's my menubar code

$(function() { $('#sdt_menu > li').bind('mouseenter',function(){ var $elem = $(this); $elem.find('img') .stop(true) .animate({ 'width':'170px', 'height':'170px', 'left':'0px' },400,'easeOutBack') .andSelf() .find('.sdt_wrap') .stop(true) .animate({'top':'140px'},500,'easeOutBack') .andSelf() .find('.sdt_active') .stop(true) .animate({'height':'170px'},300,function(){ var $sub_menu = $elem.find('.sdt_box'); if($sub_menu.length){ var left = '170px'; if($elem.parent().children().length == $elem.index()+1) left = '-170px'; $sub_menu.show().animate({'left':left},200); } }); }).bind('mouseleave',function(){ var $elem = $(this); var $sub_menu = $elem.find('.sdt_box'); if($sub_menu.length) $sub_menu.hide().css('left','0px'); $elem.find('.sdt_active') .stop(true) .animate({'height':'0px'},300) .andSelf().find('img') .stop(true) .animate({ 'width':'0px', 'height':'0px', 'left':'85px'},400) .andSelf() .find('.sdt_wrap') .stop(true) .animate({'top':'25px'},500); }); });

最满意答案

我建议你可能会有一些轻微损坏的PNG。

建议您尝试以下操作:将Photoshop中的PNG重新保存。 保存PNG-24和PNG-8。 测试。

我以前看过这个PNG,但没有正确保存。

我测试了两个macbook上的站点,其中一个是核心二重奏组2,另一个是核心二重奏组。 即使在播放视频时,菜单也很顺畅。

假设你在其他答案中列出了其他步骤(例如创建新帐户并进行了测试),那么我认为你需要考虑还有哪些因素会使这些Mac变得不同?什么版本的OS X?什么模型即macbook vs Macbook pro vs Air等)

I suggest you may have a some slighty corrupted PNGs.

Suggest you try the following: resave the PNGs out of photoshop. Save both PNG-24 and PNG-8. Test .

I have seen this before with PNGs that did not quite save correctly.

I tested the site on two macbooks pros one a core duo 2 and the other a core duo. Both ran fine the menu was very responsive even while the video was playing.

Assuming you have one the other steps listed in other answers here on the "suspect macs) ( ie created new accounts and tested ) then i think you need to look at what else makes those Macs different ? What version of OS X ? What model ( ie macbook vs Macbook pro vs Air etc )

更多推荐

本文发布于:2023-07-04 09:20:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1022296.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:透明   速度   网页   网站   Javascript

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!