Slow JavaScript animation in Chrome

前端 未结 2 1297
逝去的感伤
逝去的感伤 2021-01-06 03:46

i have a problem with the style manipulation of an HTML object in Chrome.

Here is an example:

var a = document.createElement(\'div\');

a.style.posit         


        
2条回答
  •  无人及你
    2021-01-06 04:10

    Your timer will execute many many times a second. I would suggest that it is too fast which could be causing browser lag. The jQuery animate function interval is 50ms I believe.

    Take a look at this question which talks about interval browser performance and consider raising your interval time.

提交回复
热议问题