开发者

what is the fastest CSS display Property for Animating DOM element

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜