Animation CSS3: display + opacity

前端 未结 15 2883
轮回少年
轮回少年 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:13

    HOW TO ANIMATE OPACITY WITH CSS:
    this is my code:
    the CSS code

    .item {   
        height:200px;
        width:200px;
        background:red;
        opacity:0;
        transition: opacity 1s ease-in-out;
    }
    
    .item:hover {
        opacity: 1;
    }
    code {
        background: linear-gradient(to right,#fce4ed,#ffe8cc);
    }

    move mouse over top of this text

    or check this demo file

    function vote(){
    var vote = getElementById("yourOpinion")
    if(this.workWithYou):
    vote += 1 };
    lol

提交回复
热议问题