问题
here is my code it seems that i cant loop the music, any idea?
<embed name="lostmojo" src="music/Loving.mp3" loop="true" hidden="true" autostart="true">
Thanks in advance!
回答1:
Does the music play at all? I had problems getting it to play using Firefox. If it doesn't play at all, the problem may be due to the hidden
attribute, which has spotty support among browsers. If you remove the hidden="true"
does it work?
If this is the case, try using CSS to hide the element. Something like this:
<embed name="lostmojo" src="music/Loving.mp3" loop="true" autostart="true" style="visibility:hidden;"/>
That seemed to work for me. The test audio I used looped correctly in Firefox.
来源:https://stackoverflow.com/questions/20881141/html-cant-loop-the-music