What is the difference between visibility:hidden and display:none?

前端 未结 18 1620
余生分开走
余生分开走 2020-11-21 04:50

The CSS rules visibility:hidden and display:none both result in the element not being visible. Are these synonyms?

18条回答
  •  情话喂你
    2020-11-21 05:21

    One other difference is that visibility:hidden works in really, really old browsers, and display:none does not:

    https://www.w3schools.com/cssref/pr_class_visibility.asp

    https://www.w3schools.com/cssref/pr_class_display.asp

提交回复
热议问题