Autoplay an audio with HTML5 embed tag while the player is invisible
问题 I want to autoplay a MP3 audio file and I don't want the player to be visible. <div id="music"><embed src="Comfortably Numb.mp3" autostart=true loop=false></div> When I added display:none to the audio tag using css, it doesn't play the music at all. Could someone explain me hot to play the music without displaying the player? 回答1: Alternatively you can try the basic thing to get your need, <audio autoplay loop> <source src="johann_sebastian_bach_air.mp3"> </audio> For further reference click