开发者

Why is element.scrollLeft so slow in IE?

I have been timing how long it takes to say

div = document.getElementById('mydiv');
div.scrollLeft;

where mydiv has a set width and overflow-x: scroll.

In chrome and FF, this object access (its not a fn call right, why does it have to do any work?) is essentially free (never more than a couple ms). In IE though (6,7,8) it is on the order of a开发者_如何学编程 couple seconds if the div is wide enough. What can I do about this?

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜