如何使鼠标离开第一个div时动画逆向播放,文本逐渐变小而不是瞬间变小?
如何使逆向播放的速度变慢5倍?
这是下面代码的演示:
.two {
font-size: 0;
}
.one:hover + .two {
text-align: center;
-webkit-animation: zoom_in 0.5s ease 0s forwards;
-moz-animation: zoom_in 0.5s ease 0s forwards;
-o-animation: zoom_in 0.5s ease 0s forwards;
}
@-webkit-keyframes zoom_in {
from {
font-size: 0;
}
to {
font-size: 20px;
}
}
@-moz-keyframes zoom_in {
from {
font-size: 0;
}
to {
font-size: 20px;
}
}
@-o-keyframes zoom_in {
from {
font-size: 0;
}
to {
font-size: 20px;
}
}
<div class="one">
Hover
</div>
<div class="two">
Hello World!
</div>