Reflow triggering method

Reflow occurs in the following situations:

 

Insert, delete or update elements in the DOM

Modify the content on the page, such as the text in the input box

Move DOM elements

Animated DOM elements

Measure elements such as offsetHeight or getComputedStyle

Change CSS style

Change the element's className

Add or delete style sheets

Resize the window

scroll

Guess you like

Origin www.cnblogs.com/xiaoyaoweb/p/12732816.html