display: none and visible: hidden similarities and differences

1, display: none and visible: hidden can put an element on the page to hide.

2, but the two are different:

● display: none --- not being hidden objects retain their physical space, that is, the object is completely disappeared on the page, it is popular not be seen or touched.

● visible: hidden --- make objects invisible on the page, but the space occupied by the object on the page has not changed, it is popular invisible but palpable.

 

1, visibility: hidden ---- The element hiding, but the page in the occupied position or occupied.

2, display: none ---- the display element is set free, that does not account for any location in the page.

3, for example, there are three table, the middle of a table hidden away, you will find that the table is hidden out of sight, but the middle will leave a big gap, but this gap is not hidden this table share position.

4, but none is more like the role of the elements from the web page "remove" (of course, not really removed, the effect is just so)

5, for example, there are three table, the middle of a table none out, you will find a table in the middle of the remaining two will not have any gaps. Just like in the middle of the table as it never existed.

Guess you like

Origin www.cnblogs.com/Dmand/p/12157556.html