我有一个动画div:
但是到目前为止,弹跳和闪烁动画已覆盖我的悬停命令。似乎无论我将什么放在:hover代码中,都不会发生!
提琴:http://jsfiddle.net/L731nuxw/
我要模仿的行为: https://clus.io
<div class="info-container">
<div class="transition-up" style={{ paddingBottom: '20%' }}>
<h3>
<b>
Pick Web
</b>
</h3>
</div>
<div class=img-parent>
<img class="image-yo" src=https://placeimg.com/640/480/any>
</div>
<div class="bounce transition-down">
Hover to see more
</div>
<div class="transition-down" style={{ paddingTop: '20%' }}>
Learn More >
</div>
</div>
答案 0 :(得分:0)
这行吗?...
看看Clusio上的示例...您不应该在“选择网络”和“了解更多信息”上进行转换...
.transition-up,
.bounce-and-flicker,
.transition-down,
.image-yo {
transition: all .6s;
}
.info-container:hover>.transition-up {
transform: translateY(-50vh);
}
.info-container:hover>.transition-down {
transform: translateY(50vh);
opacity: 0;
}
.info-container:hover>.bounce-and-flicker {
opacity: 0;
}
.info-container:hover>.img-parent>.image-yo {
opacity: 100;
}
.image-yo {
opacity: 0;
position: absolute;
}
.img-parent {
position: relative;
}
.info-container:hover>.bounce {
display: none;
}
.bounce {
-webkit-animation: bounce-and-flicker 0.5s infinite;
-moz-animation: bounce-and-flicker 0.5s infinite;
-o-animation: bounce-and-flicker 0.5s infinite;
animation: bounce-and-flicker 3s infinite;
}
@-webkit-keyframes bounce-and-flicker {
0% {
opacity: 0;
transform: translate(0, 0px);
}
55% {
transform: translate(0, -15px);
opacity: 1;
}
100% {
opacity: 0;
transform: translate(0, -0px);
}
}
@-moz-keyframes bounce-and-flicker {
0% {
opacity: 0;
transform: translate(0, 0px);
}
55% {
transform: translate(0, -15px);
opacity: 1;
}
100% {
opacity: 0;
transform: translate(0, -0px);
}
}
<div class="info-container">
<div class="transition-up" style={{ paddingBottom: '20%' }}>
<h3>
<b>
Pick Web
</b>
</h3>
</div>
<div class=img-parent>
<img class="image-yo" src=https://placeimg.com/640/480/any> </div> <div class="bounce transition-down">
Hover to see more
</div>
<div class="transition-down" style={{ paddingTop: '20%' }}>
Learn More >
</div>
</div>