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

后端 未结 5 1229
野的像风
野的像风 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:35

    Visibility:hidden just make the element invisible but it is loaded in DOM so it consumes load time. But Display:none does not load the element.

提交回复
热议问题