Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/css/39.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Html CSS bounceInDown效果不起作用_Html_Css - Fatal编程技术网

Html CSS bounceInDown效果不起作用

Html CSS bounceInDown效果不起作用,html,css,Html,Css,我试图达到一种“反弹内陷”的效果,就像,但什么也没发生。你知道怎么了吗?参见JSFIDLE: HTML: 您必须添加两个类。animated类将项目指定为动画项目。然后单击bounceInDown,以定义动画的类型 <div id="box" class="animated bounceInDown">test</div> 测试 以下是一个简单的解决方案: 首先创建一个css类myAnimation。 然后在HTML中使用它: .myAnimation{ -webk

我试图达到一种“反弹内陷”的效果,就像,但什么也没发生。你知道怎么了吗?参见JSFIDLE:

HTML:


您必须添加两个类。
animated
类将项目指定为动画项目。然后单击
bounceInDown
,以定义动画的类型

<div id="box" class="animated bounceInDown">test</div>
测试

以下是一个简单的解决方案:

首先创建一个css类
myAnimation
。 然后在HTML中使用它:

.myAnimation{
-webkit动画:弹跳输入1秒,轻松输入输出200秒;
动画:弹跳下降1秒,缓慢下降200秒;
}
使用animate.css制作动画
#box {
    position: absolute;
    top: 317px;
    left: 295px;
    padding: 20px 20px 20px 55px;
    text-decoration: none;
    background:#0F6
}

/*
Animate.css - http://daneden.me/animate
*/

.animated{-webkit-animation-fill-mode:both;-moz-animation-fill-mode:both;-ms-animation-fill-mode:both;-o-animation-fill-mode:both;animation-fill-mode:both;-webkit-animation-duration:1s;-moz-animation-duration:1s;-ms-animation-duration:1s;-o-animation-duration:1s;animation-duration:1s;}.animated.hinge{-webkit-animation-duration:2s;-moz-animation-duration:2s;-ms-animation-duration:2s;-o-animation-duration:2s;animation-duration:2s;}@-webkit-keyframes fadeIn {
    0% {opacity: 0;}    100% {opacity: 1;}
}

@-moz-keyframes fadeIn {
    0% {opacity: 0;}    
    100% {opacity: 1;}
}

@-o-keyframes fadeIn {
    0% {opacity: 0;}    
    100% {opacity: 1;}
}

@keyframes fadeIn {
    0% {opacity: 0;}    
    100% {opacity: 1;}
}

.fadeIn {
    -webkit-animation-name: fadeIn;
    -moz-animation-name: fadeIn;
    -o-animation-name: fadeIn;
    animation-name: fadeIn;
}
@-webkit-keyframes fadeInDownBig {
    0% {
        opacity: 0;
        -webkit-transform: translateY(-2000px);
    }

    100% {
        opacity: 1;
        -webkit-transform: translateY(0);
    }
}

@-moz-keyframes fadeInDownBig {
    0% {
        opacity: 0;
        -moz-transform: translateY(-2000px);
    }

    100% {
        opacity: 1;
        -moz-transform: translateY(0);
    }
}

@-o-keyframes fadeInDownBig {
    0% {
        opacity: 0;
        -o-transform: translateY(-2000px);
    }

    100% {
        opacity: 1;
        -o-transform: translateY(0);
    }
}

@keyframes fadeInDownBig {
    0% {
        opacity: 0;
        transform: translateY(-2000px);
    }

    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.fadeInDownBig {
    -webkit-animation-name: fadeInDownBig;
    -moz-animation-name: fadeInDownBig;
    -o-animation-name: fadeInDownBig;
    animation-name: fadeInDownBig;
}
@-webkit-keyframes bounceInDown {
    0% {
        opacity: 0;
        -webkit-transform: translateY(-2000px);
    }

    60% {
        opacity: 1;
        -webkit-transform: translateY(30px);
    }

    80% {
        -webkit-transform: translateY(-10px);
    }

    100% {
        -webkit-transform: translateY(0);
    }
}

@-moz-keyframes bounceInDown {
    0% {
        opacity: 0;
        -moz-transform: translateY(-2000px);
    }

    60% {
        opacity: 1;
        -moz-transform: translateY(30px);
    }

    80% {
        -moz-transform: translateY(-10px);
    }

    100% {
        -moz-transform: translateY(0);
    }
}

@-o-keyframes bounceInDown {
    0% {
        opacity: 0;
        -o-transform: translateY(-2000px);
    }

    60% {
        opacity: 1;
        -o-transform: translateY(30px);
    }

    80% {
        -o-transform: translateY(-10px);
    }

    100% {
        -o-transform: translateY(0);
    }
}

@keyframes bounceInDown {
    0% {
        opacity: 0;
        transform: translateY(-2000px);
    }

    60% {
        opacity: 1;
        transform: translateY(30px);
    }

    80% {
        transform: translateY(-10px);
    }

    100% {
        transform: translateY(0);
    }
}

.bounceInDown {
    -webkit-animation-name: bounceInDown;
    -moz-animation-name: bounceInDown;
    -o-animation-name: bounceInDown;
    animation-name: bounceInDown;
}
<div id="box" class="animated bounceInDown">test</div>