.animated {
-webkit-animation-duration: 0.3s;
animation-duration: 0.3s;
-webkit-animation-fill-mode: both;
animation-fill-mode: both;
}
@-webkit-keyframes fadeIn {
0% {opacity: 0;}
100% {opacity: 1;}
}
@keyframes fadeIn {
0% {opacity: 0;}
100% {opacity: 1;}
}
.fadeIn {
-webkit-animation-name: fadeIn;
animation-name: fadeIn;
}
:hover
<div></div>
измени добавь id class..div {
background: red;
width:100px;
height:100px;
-webkit-animation: mymove 0.3s infinite;
animation: mymove 0.3s infinite;
}
@-webkit-keyframes mymove {
0% {opacity: 0;}
100% {opacity: 1;}
}
@keyframes mymove {
0% {opacity: 0;}
100% {opacity: 1;}
}
/* При наведении */
div:hover{
-webkit-animation: mymove1 0.3s infinite;
animation: mymove1 0.3s infinite;
}
@-webkit-keyframes mymove1 {
0% {opacity: 1;}
100% {opacity: 1;}
}
@keyframes mymove1 {
0% {opacity: 1;}
100% {opacity: 1;}
}