Copyright: Original, welcome to reprint https://blog.csdn.net/weixin_43731793/article/details/91378448
1 Introduction
display
How to set up a property should display element,
visibility
attribute specifies an element should be visible or hidden.
2, Tibetan elements - display: none or visibility: hidden
Hide an element by the display attribute set to "none", or the visibility property to "hidden". Note, however, these two methods will produce different results.
visibility:hidden
You can hide an element, but hidden element still occupies the same space previously not hidden. In other words, although the element is hidden, but still affects layout.
display:none
You can hide an element, and the hidden element will not take up any space. In other words, this element is not only hidden, and the space occupied by the original element will disappear from the page layout.