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

前端 未结 9 1472
予麋鹿
予麋鹿 2020-11-22 11:53

If so, does it effectively deprecate the visibility property?

(I realize that Internet Explorer does not yet support this CSS2 property.)
Comparis

9条回答
  •  清歌不尽
    2020-11-22 12:42

    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.

提交回复
热议问题