CSS3实现闪烁动画效果

给class属性名为className的元素添加闪烁动画效果

.className{
    -webkit-animation: twinkling 1s infinite ease-in-out
}
.animated{
    -webkit-animation-duration: 1s;
    animation-duration: 1s;
    -webkit-animation-fill-mode: both;
    animation-fill-mode: both
}
@-webkit-keyframes twinkling{
    0%{
        opacity: 0.5;
    }
    100%{
        opacity: 1;
    }
}
@keyframes twinkling{
    0%{
        opacity: 0.5;
    }
    100%{
        opacity: 1;
    }
}




你可能感兴趣的:(CSS)