标签:div image images doc webkit remove get 状态 pause
$("#music_btn").click(function(){ var music = document.getElementById(‘music‘); if(music.paused){ music.play(); $("#music_btn").attr("src","images/play_music.png");//播放状态图片 $(this).addClass("rotate"); }else{ music.pause(); $("#music_btn").attr("src","images/close_music.png");//暂停状态图片 $(this).removeClass("rotate");//控制图片是否转圈圈 } });
#audio_btn.rotate img{ animation: round 1.2s infinite ease-in-out; -webkit-animation: round 1.2s infinite linear; } @-webkit-keyframes round { 0%{transform:rotate(0deg);} 100% {transform:rotate(360deg);} } @-moz-keyframes round { 0%{transform:rotate(0deg);} 100% {transform:rotate(360deg);} } @keyframes round { 0%{transform:rotate(0deg);} 100% {transform:rotate(360deg);} }
标签:div image images doc webkit remove get 状态 pause
原文地址:http://www.cnblogs.com/Anne3/p/6862905.html