workaround for display block and css transitions not triggering

后端 未结 4 741
一个人的身影
一个人的身影 2021-01-12 21:16

Sorry all for so many updates in this question and I\'m glad for everyone trying to help me. I think below there is a more clear way to understand this problem:

4条回答
  •  清酒与你
    2021-01-12 21:40

    You can show / hide element without javascript using css transition only.

    
    
    Some parent text
    Some details
    /*css*/ #parent #creative{ opacity:0; visibility:hidden; clip: rect(0px,0px,0px,0px); transition: all 0.5s; } #parent:hover #creative{/*trigger transition*/ opacity:1; visibility:visible; clip: rect(0px,220px,0px,330px); }

提交回复
热议问题