Why does jQuery show/hide use display:none instead of visibility:hidden?

后端 未结 5 1219
野的像风
野的像风 2020-12-13 12:14

display:none means that the element isn\'t rendered as part of the DOM, so it\'s not loaded until the display property changes to something else.

5条回答
  •  感情败类
    2020-12-13 12:43

    Visibility:hidden makes the element invisible in a way that it still uses space at the page. Display:none makes the element have no space and be completely gone, while it still exists in the DOM.

提交回复
热议问题