摘要:
1. Change classes on the element you wish to style (as low in the dom tree as possible)尽可能限制reflow的影响范围。以上面的代码为例,要改变p的样式,class不要加在div上,通过父级元素影响子元素不好。最好直接加在p上。2 Avoid setting multiple inline styles通过设置style属性改变结点样式的话,每设置一次都会导致一次reflow。所以最好通过设置class的方式。3 Apply animations to elements that are position 阅读全文
posted @ 2011-01-17 09:50
ia00.com
阅读(217)
评论(0)
推荐(0)

浙公网安备 33010602011771号