Re-painting and Backflow

Source: Internet
Author: User

1. When some (or all) of the render tree are changed due to the size, layout, and hiding of the elements, they need to be rebuilt. This is
It is called reflux (in fact, I think it is simpler and clearer to relay the layout ). Each page requires at least one backflow, that is, the first addition
. 2. When some elements in the render tree need to update attributes, these attributes only affect the appearance and style of elements.
Without affecting the layout, such as background-color. This is called repainting. Note: It can be seen from the above that reflux is bound
This may cause re-painting, but re-painting may not necessarily cause backflow.
In fact, any operation on the elements in the render tree will cause reflux or re-painting. For example:
1. add and delete elements (reflux + re-painting)
2. Hide elements, display: none (reflux + re-painting), visibility: hidden (only re-painting, no reflux)
3. Move elements, for example, change top, left (jquery's animate method is to change top, left does not necessarily affect reflux ),
Or move the element to another parent element. (Re-painting + reflux)
4. operations on the style (the impact on different attribute operations is different)
5. user operations, such as changing the browser size and font size (reflux + re-painting)

Re-painting and Backflow

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.