Does opacity:0 have exactly the same effect as visibility:hidden

css, html

Solution

Here is a compilation of verified information from the various answers.

Each of these CSS properties is unique. In addition to rendering an element not visible, they have the following additional effect(s):

- Collapses the space that the element would normally occupy

- Responds to events (e.g., click, keypress)

- Participates in the taborder

                     collapse events taborder
opacity: 0              No     Yes     Yes
visibility: hidden      No     No      No
visibility: collapse   Yes*    No      No
display: none          Yes     No      No

* Yes inside a table element, otherwise No.

Problem

If so, does it effectively deprecate the `visibility` property? (I realize that Internet Explorer does not yet support this CSS2 property.) Comparisons of layout engines See also: What is the difference between visibility:hidden and display:none

Original source

Related problems