HTML无法播放音乐 [英] HTML can't loop the music

查看:460
本文介绍了HTML无法播放音乐的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这是我的代码
,似乎我无法循环播放音乐,有什么想法吗?

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">

提前谢谢!

推荐答案

音乐是否可以播放?我在使用Firefox玩游戏时遇到问题。如果它根本不起作用,则可能是由于 hidden 属性引起的,该属性在浏览器中支持不一。如果您删除了 hidden = true 是否起作用?

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?

如果是这种情况,请尝试使用CSS隐藏元素。这样的事情:

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;"/>

这似乎对我有用。我使用的测试音频在Firefox中正确循环。

That seemed to work for me. The test audio I used looped correctly in Firefox.

这篇关于HTML无法播放音乐的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆