Shine effect automatically with css

后端 未结 1 497
终归单人心
终归单人心 2021-02-01 09:31

I\'m trying to do this shine effect operate automatically (without a: hover), every 5 seconds.

http://jsfiddle.net/AntonTrollback/nqQc7/

.icon:after {
          


        
相关标签:
1条回答
  • 2021-02-01 09:50

    You can create CSS animation like this DEMO

     @keyframes shine{
      10% {
        opacity: 1;
        top: -30%;
        left: -30%;
        transition-property: left, top, opacity;
        transition-duration: 0.7s, 0.7s, 0.15s;
        transition-timing-function: ease;
      }
      100% {
        opacity: 0;
        top: -30%;
        left: -30%;
        transition-property: left, top, opacity;
      }
    }
    
    0 讨论(0)
提交回复
热议问题