【转】css3实现文字闪烁,改变透明度

 

<style>
  @-webkit-keyframes shake{
    0%{
      opacity: 1;
    }
    50%{
      opacity: 0.5;
    }
    100%{
      opacity: 1;
    }
  }
  @keyframes shake{
    0%{
      opacity: 1;
    }
    50%{
      opacity: 0.5;
    }
    100%{
      opacity: 1;
    }
  }
  .shake{
    -webkit-animation: shake .2s infinite;
    animation: shake .2s infinite;
  }
</style>
<h1 class="shake">Hello Liaocheng!</h1>

 

转自:https://segmentfault.com/q/1010000011779312/a-1020000011779379

 

posted @ 2018-07-18 16:00  宝山方圆  阅读(209)  评论(0)    收藏  举报