it seem that
display开发者_JAVA百科: block
cause less reflow then
display: table
also is there any css property that could be set to make sur that changing one dom element won't affect the layout of some other element and thus causing extra repaint or reflow.
Adding position:absolute
to the element would take the element completely out of the flow of the page, therefore causing no reflow for other elements.
You can use visibility: visible;
and visibility: hidden;
. As the element still takes up space while it's hidden, the impact on the layout is minimal when you show/hide it.
精彩评论