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
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
I'm not entirely sure of this, but I think screen readers don't read things that are set to visibility hidden, but they may read things regardless of their opacity.
That's the only difference I can think of.
Im not sure entirely, but this is how i do cross browser transparency:
opacity: 0.6;
-moz-opacity: 0.6;
filter: alpha(opacity=60);
objects with Visibility:hidden still have shape, they just arent visible. opacity zero elements can still be clicked and react to other events.
What Phil says is true.
IE supports opacity though:
filter:alpha(opacity=0);
Here is a compilation of verified information from the various answers.
Each of these CSS properties is in fact unique. In addition to rendering an element not visible, they have the following additional effect(s):
collapse events taborder opacity: 0 No Yes Yes visibility: hidden No No No visibility: collapse * No No display: none Yes No No * Yes inside a table element, otherwise No.
The properties have different semantic meanings. While semantic CSS sounds like it may be silly, as other users have mentioned it has an impact on devices like screen readers -- where semantics impact the accessibility of a page.
No.
Elements with opacity create new stacking context.
Also, CSS spec doesn't define this, but elements with opacity:0
are clickable, and elements with visibility:hidden
are not.