Z-index can be redrawn (repaint) of the corresponding elements.Knowledge about redrawing (repaint) and Reflow (reflow):1. Add and remove elements (Reflow +Redraw)2. Hidden elements, Display:none (Reflow +Redraw), Visibility:hidden (redraw only, not reflow)3. Moving element
Copy Code code as follows:
Repaint (redraw), the appearance of the element changes when the repaint changes, and occurs without changing the layout, such as changing the outline,visibility,background color without affecting the DOM structure rendering.
Reflow (rendering), and repaint difference is that he will affect the DOM of the structure rendering, and he will trigger the repaint, he will change himself with all the parents of the element
Before you introduce the browser reflow and redraw, let's look at how the browser works once we understand how the browser works, we can better navigate it.Modern browsers typically have two important threads of execution, and these two threads work together to render the page: the main thread
Typically, the main threa
Repaint (redraw), the appearance of the element changes when the repaint changes, and occurs without changing the layout, such as changing the outline,visibility,background color without affecting the DOM structure rendering.
Reflow (rendering), and repaint difference is that he will affect the DOM of the structure rendering, and he will trigger the repaint, he will change himself with all the parents of the elements (ancestors), this cost is very ex
When a large number of DOM nodes and their styles are involved, sometimes the screen is not smooth, but the browser Alexander is unknown. Therefore, we must be clear about reflow and repaint ). Based on the style (size, color, location, etc.) of each Dom node, the browser calculates the position and space occupied by each node on the page, this process can be ca
Repaint: When repaint is changed, the appearance of the element is changed and the layout is not changed, such as changing outline, visibility, backgroundcolor, does not affect dom structure rendering. Reflow (rendering), the difference from repaint is that it will affect dom... Synta
Repaint: When repaint is changed, the appearance of the element is changed and the layout is not changed, such as changing outline, visibility, background color, does no
Copy codeThe Code is as follows:Repaint: When repaint is changed, the appearance of the element is changed and the layout is not changed, such as changing outline, visibility, background color, does not affect dom structure rendering.
Reflow (rendering). The difference from repaint is that it will affect the dom structure rendering, and it will trigger repaint, which will change itself and all parent elements (ancestor ), this overhead is very expensi
Repaint (redraw), when repaint changes, the appearance of the element is changed and occurs without changing the layout, such as changing the outline,visibility,background color without affecting the DOM structure rendering.Reflow (rendering), unlike repaint, is that he will affect the structure of the DOM rendering, and he will trigger repaint, he will change himself and all of the parent elements (ancestors), this overhead is very expensive, resulting in performance degradation is inevitable,
one of the reasons we try to avoid using table layout pages.3. Describe the relationship between redrawing and rearrangementRedrawing does not cause reflow, but reflow is bound to cause repainting, and the rearrangement of an element often leads to a series of reactions, even triggering the rearrangement and redrawing of the entire document, which can be costly to perform.4. What happens when a
Repaint (redraw), when repaint changes, the appearance of the element is changed and occurs without changing the layout, such as changing the outline,visibility,background color without affecting the DOM structure rendering.Reflow (rendering), unlike repaint, is that he will affect the structure of the DOM rendering, and he will trigger repaint, he will change himself and all of the parent elements (ancestors), this overhead is very expensive, resulting in performance degradation is inevitable,
Front-End performance optimization method:One. Reduce HTTP Requests(1) By merging pictures, reduce requests, commonly known as CSS sprites (CSS sprite) CSS Sprites(2) Lazyload lazy loading, reload when needed1. Definition: Lazy loading is also called delayed loading, the image needs to be used when the value2. Usage: Is the Get method of overriding the object, when the system calls the Get method to load the object3. Advantages: (1) The instantiation of the object in the Getter method, the respe
Force redraw Ele.setattribute (' style ', ele.getattribute (' style ')); 1, when some or all of the render tree (render trees) because of the size of the elements, layout, hiding and other changes need to be rebuilt, called reflux every page at least once, is the first time the page loaded. That is, the part that is affected by the modification "flow again", after the return, the browser redraws the affected part to the screen, the process is called R
hard to be applied on all devices due to performance and compatibility issues. An uses html + css + js, in addition, animations are generated based on some features of the new standard to adapt to more scenarios.
Edge Reflow-a responsive design tool. In fact, there are still not many responsive websites in China. In addition to some first-class Internet companies with great design outsourcing and technology, responsive websites are still quite rare
Redraw: Re-rendering of an area or objectReflow: Redraws an area, an object, and, depending on the condition, its ancestor objects into redraw (and possibly infinite recursion until the top ancestor object)Redraw how it appears: changing the shape, coordinates, performance, and content of an object will cause the object to be re-rendered, a phenomenon that is redrawn.How reflow occurs: When the object is about to be redrawn, the
foreign body under the feeding device, and the spring is aging, or poor electrical), resulting in insufficient or poor retrieval of materials and throwing materials, there is damage to the feeding device. Countermeasure: Adjust the feeding device, clean the feeding platform, and replace the bad parts or feeding device. When there is a throwing phenomenon, you can first ask the on-site personnel to describe it, then, we can find out the problem based on the observation and analysis, so that we c
position to absolute or fixed
When the element's position is static and relative, the element is in the DOM tree structure, and the browser renders the entire page when an operation on the element needs to be rendered again. Setting the position of an element to absolute and fixed allows the element to be detached from the DOM tree, and the browser needs to render the element only as well as the elements
This article is reproduced from: iOS training, original address: http://www.zgios.com/Mackaifa/357.htmlWhat we bring to you today is the third chapter of the preview app. In writing these words, I deeply feel that the "preview" is really the OS X user ignored more utility programs. Because its name is "preview", as if it is just a file browser, but in fact, it can not only read, preview the file, but also to quickly organize the file.Here's how to use
problem troubled me this little rookie for a long time, the previous two days read a blog, a little harvest, take out to share, do not know what they understand is right, welcome to shoot bricks. First distinguish the concept:Redrawing is the browser behavior caused by the appearance change of an element;Rearrangement is the behavior that causes the DOM tree to recalculate;Then take a look at a snippet of CSS code that you'll often see:This is a sli
1. Cascade Design ProcessThe general flow of the Cascade design is as follows:The evaluation of the number of cabling layers and the evaluation of the number of power layers will be described in detail in the next article. In this article, we originally wanted to talk about signal reflow and reference plane problems first. But the previous article, found that has been discussed, so this article to do a link guide (after all, Mr. High-speed public numb
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.