css to achieve dynamic effects around the aperture Avatar

effect:

 

html file:

<img class="userHead" src="xx/user.jpg">    

css file:

.userHead{
    width:.3rem;
    height:.3rem;
    border-radius:50%;
    -webkit-animation: ani 2s linear infinite;
}

@keyframes ani {
   0%{
        box-shadow: 0 0 0px #ff8329
   }
   25%{
        box-shadow: 0 0 10px #ff8329
   }
    50%{
        box-shadow: 0 0 20px #ff8329
   }
   75%{
        box-shadow: 0 0 10px #ff8329
   }
   100%{
    box-shadow: 0 0 0px #ff8329
   }
}

 

Guess you like

Origin www.cnblogs.com/linjiangxian/p/11457719.html