Animation CSS3: display + opacity

前端 未结 15 2927
轮回少年
轮回少年 2020-11-27 11:42

I have got a problem with a CSS3 animation.

.child {
    opacity: 0;
    display: none;

    -webkit-transition: opacity 0.5s ease-in-out;
    -moz-transit         


        
15条回答
  •  情歌与酒
    2020-11-27 12:17

    On absolute or fixed elements you could also use z-index:

    .item {
        position: absolute;
        z-index: -100;
    }
    
    .item:hover {
        z-index: 100;
    }
    

    Other elements should have a z-index between -100 and 100 now.

提交回复
热议问题