the Web Design Speciailist
CSS 滑過區塊有閃爍效果
2017-09-12 11:17:32  CSS

CSS 滑過區塊有閃爍效果,可使用於前端效果使用


  1. #div_bg{ background:rgba(0,0,0,0.5);transition:opacity 0.5s linear 0s; }
  2. #div_bg:hover{ -moz-animation:bg .5s ease-in-out;-webkit-animation:bg .5s ease-in-out; }
  3.  
  4.  
  5. @-moz-keyframes bg{0%{background:rgba(144,24,53,0.18);}
  6. 25%{background:rgba(144,24,53,0.5);}
  7. 50%{background:rgba(144,24,53,0.1);}
  8. 75%{background:rgba(144,24,53,0.5);}
  9. 100%{background:rgba(144,24,53,0.18);}}
  10.  
  11.  
  12. @-webkit-keyframes bg{0%{background:rgba(144,24,53,0.18);}
  13. 25%{background:rgba(144,24,53,0.5);}
  14. 50%{background:rgba(144,24,53,0.1);}
  15. 75%{background:rgba(144,24,53,0.3);}
  16. 100%{background:rgba(144,24,53,0.18);}}