Delay rendering of dom element when changing properties

前端 未结 4 1506
無奈伤痛
無奈伤痛 2021-01-05 05:46

I\'ve currently run into a performance problem when updating properties on lots of dom elements at once. It seems that each time I change a property the dom element gets re-

4条回答
  •  清歌不尽
    2021-01-05 06:34

    Agree with @Crimson but I think that it will be better to hide the parent of all the elements that you're updating and if they don't have an exclusive parent, try to create one.

    In that way only two reflows will occur, one when you hide the tile container, and other when you finish the element manipulation and you show it again.

提交回复
热议问题