CSS3 transition fadein with display:none

后端 未结 5 867
野性不改
野性不改 2021-02-07 10:34

I\'ve got some element I want to fade with CSS3. It can be simply done by 2 classes with opacity: 0 and opacity: 1, b

5条回答
  •  独厮守ぢ
    2021-02-07 11:03

    Instead of display:none, try using visibility: hidden;

    FIDDLE

    See this article which states:

    visibility animates despite the CSS Basic Box Model spec saying “Animatable: no”

提交回复
热议问题