記一個滑鼠略過時候的css動畫

流火行者發表於2017-08-02
.circle{
width: 15px;
height: 15px;
background: rgba(0,0,0,0.7);
border-radius: 50%;
display: table-cell;
margin-right: 3px;
transition: all 0.5s ease;
}
.circle:hover{
background: #C7015C;
transform: scale(1.15);
}


或者
<div class='aniRotate'></div>
.aniRotate{
animation:rotatePicture 0.5s 1;
animation-timing-function:ease;
/*animation-direction:alternate;*/
}
@keyframes rotatePicture {
0%{

transform: rotate(0deg) scale(1);
}
25%{
transform: rotate(-5deg) scale(1.2);
}
50%{
transform: rotate(0deg) scale(1);
}
75%{
transform: rotate(5deg) scale(1.2);
}
100%{
transform: rotate(0deg) scale(1);
}
}

相關文章