开发者

what is the fastest CSS display Property for Animating DOM element

开发者 https://www.devze.com 2023-04-10 15:52 出处:网络
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 l

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

精彩评论

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