测试
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title></title> <style> .anim-opacity2{animation: 2s opacity2 0s infinite; -webkit-animation: 2s opacity2 0s infinite;-moz-animation: 2s opacity2 0s infinite;} @keyframes opacity2{ 0%{opacity:0} 50%{opacity:.8;} 100%{opacity:0;} } @-webkit-keyframes opacity2{ 0%{opacity:0} 50%{opacity:.8;} 100%{opacity:0;} } @-moz-keyframes opacity2{ 0%{opacity:0} 50%{opacity:.8;} 100%{opacity:0;} } </style> </head> <body> <h1 class="anim-opacity2">测试</h1> </body> </html>