导航

CSS呼吸灯效果

Posted on 2019-11-20 13:45  WinChance  阅读(578)  评论(0编辑  收藏  举报
<html>

<head>

</head>
<body>
<div class="arrow_box">按按</div>
</body>
<style>
.arrow_box
{
width:40px;
height:40px;
animation: glow 800ms ease-out infinite alternate; 
}
@keyframes glow {
    0% {
        border-color: #393;
        box-shadow: 0 0 5px rgba(0,255,0,.2), inset 0 0 5px rgba(0,255,0,.1), 0 1px 0 #393;
    }
    100% {
        border-color: #6f6;
        box-shadow: 0 0 20px rgba(0,255,0,.6), inset 0 0 10px rgba(0,255,0,.4), 0 1px 0 #6f6;
    }
}
</style>
</html>