1
我有一個div脈動CSS3效果,我想它有一個與脈衝無縫融合了懸停效果,我有一個接近完成JFiddle這裏:將CSS3循環動畫與懸停動畫無縫融合?
https://jsfiddle.net/jnz7yfg0/
這幾乎是有,但是當你將鼠標懸停在它上面時,它會變得不平穩,讓動畫更流暢?
非常感謝!
代碼在這裏:
.orb {
width: 20px;
height: 20px;
border-radius: 10px;
background: #2fa4e7;
cursor: pointer;
opacity: 1;
-webkit-transform: scale(1);
-webkit-transition: all .2s ease-in-out;
-moz-transition: all .2s ease-in-out;
-o-transition: all .2s ease-in-out;
transition: all .2s ease-in-out;
}
@-webkit-keyframes pulsate {
0% { opacity: 1; }
50% { opacity: .4; -webkit-transform: scale(3); }
100% { opacity: 1; }
}
.orb {
-webkit-animation: pulsate 2s infinite;
}
.orb:hover {
width: 20px;
height: 20px;
border-radius: 10px;
background: #2fa4e7;
cursor: pointer;
opacity: 1;
-webkit-transition: all .2s ease-in-out;
-webkit-animation: pulsatehover 2s infinite;
}
@-webkit-keyframes pulsatehover {
0% { opacity: 1; }
50% { opacity: .4; -webkit-transform: scale(6); }
100% { opacity: 1; }
}
這真棒,完美!謝謝你的幫助! – 2015-02-25 04:00:43
它很高興,它幫助 – vals 2015-02-25 17:22:23