gpt4 book ai didi

html - CSS bounceInDown 效果不起作用

转载 作者:太空宇宙 更新时间:2023-11-04 04:32:37 25 4
gpt4 key购买 nike

我正在尝试实现类似 on this webpage 的“bounceInDown”效果,但没有任何反应。你知道哪里出了问题吗?参见 jsfiddle:http://jsfiddle.net/N2Yx9/

HTML:

<div id="box" class="bounceInDown">test</div>

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;
}

最佳答案

您必须添加两个类。 animated 类将元素指定为动画。然后是bounceInDown来定义什么类型的动画。

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

Updated Fiddle here

关于html - CSS bounceInDown 效果不起作用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16999740/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com