css闪烁效果

纯css闪烁效果demo

具体速度和颜色自己可以自己调

    <div class="father-Box">
        <div class="header-Box">
        </div>
    </div>
@keyframes test {
    from {        
    opacity: 1.0;    
    }
    50% {        
    opacity: 0.4;    
    }
    to {        
    opacity: 1.0;    
    }
}
@-webkit-keyframes test {    
    from {        
    opacity: 1.0;    
    }
    50% {        
    opacity: 0.4;    
    }
    to {        
    opacity: 1.0;    
    }
}
.father-Box {
    position: relative;
}

.header-Box {    
    color: #fff;    
    padding: 10px;    
    font-size: 15px;    
    height: 300px;    
    background-color: rgba(146, 139, 139, .8);
    animation: test 1000ms infinite;    
    -webkit-animation: test 1000ms infinite;
}

效果

相关文章

Css3如何实现鼠标移上变长特效?(图文+视频)
css3怎么实现鼠标悬停图片时缓慢变大效果?(图文+视频)
jquery如何实现点击网页回到顶部效果?(图文+视频)
css3边框阴影效果怎么做?(图文+视频)
css怎么实现圆角边框和圆形效果?(图文+视频教程)
Css3如何实现旋转移动动画特效