我有这段代码在Internet Explorer 11上嵌入音频文件。
<audio controls>
<source src="Nature.mp3" type="audio/mpeg"/>
<embed src="Nature.mp3" type="audio/mpeg">
</audio>
音频工作正常,但Internet Explorer 11在音频上方包含一个黑盒子。我假设它代表从音频文件加载的视频,但我没有放入视频。我想要的只是没有视频盒的音频。我该怎么做?
答案 0 :(得分:0)
这是修复:
<meta http-equiv="X-UA-Compatible" content="IE=edge">.
我不知道它为什么会起作用但确实如此。它也不在W3Schools的例子中。
答案 1 :(得分:0)
<meta http-equiv="X-UA-Compatible" content="IE=edge">.
在head
标记中使用此代码。基本上,此meta
标记告诉浏览器在Internet Explorer中呈现最新版本的媒体。 This question很有帮助。