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

前端 未结 9 1340
予麋鹿
予麋鹿 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:38

    No it does not. There is a big difference. They are similar because you can see through the element if visibility is hidden or opacity is 0, however

    opacity: 0 : you can not click on elements behind it.

    visibility: hidden : you can click on elements behind it.

提交回复
热议问题