最近的文章列表

分析影响网页性能的2个关键地方Reflow和Repaint

Yahoo!性能工程师Nicole Sullivan写了一篇非常值得一读的分析Reflow和Repaint的文章

repaint(重绘)是在一个元素的外观被改变,但没有改变布局的情况下发生,如改变visibility、outline、前景色。
“According to Opera , repaint is expensive because the browser must verify the visibility of all other nodes in the DOM tree.”
当repaint发生时,浏览器会验证DOM树上的所有其它结点的visibility属性。
reflow(回流)是导致DOM脚本执行低效的关键因素之一。页面上任何一个结点触发reflow,都会导致它的子结点及祖先结点重新渲染。Nicole举了个例子:
2014/5/7 Comments: